Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Spreadsheets (https://www.askmehelpdesk.com/forumdisplay.php?f=395)
-   -   Counting multiple cells in Excel (https://www.askmehelpdesk.com/showthread.php?t=351089)

  • May 7, 2009, 05:16 PM
    Bobbybee
    Counting multiple cells in Excel
    Hello,

    I wish to be able to count multiple cells which are not in a row or column adjacent to each other. If know you can use the IF formula to reference any cells you wish without them having to be in a range. How can I count cells specifying a criteria that has to be true which are not in a range? i.e count dc14, de16, df14 e.g..
  • May 7, 2009, 07:34 PM
    JBeaucaire

    Describe your criteria for a cell being counted.
  • May 7, 2009, 08:25 PM
    Bobbybee
    Hello,

    I have several individual cells in Excel which contain numbers. They are not all in the same row or column so they cannot be a range but just the individual cells.

    I don't think I need to count different cells now, but was really just wondering how to count the number of cells that contain data but at different locations on the spreadsheet.

    Can you use count like the if statement in a similar format to

    =if(b4="Yes",a5,if(c4="No",a4,if(d4="Yes",e4)etc, if and keep going with multiple conditions?
    The formula =countif(af3:af13,">0") works fine if you have a range, but what if you don't but want to add different cells in different locations on the spreadsheet?

    Also do you know how to do an if formula to say greater than 5 but less than 8 for instance?
  • May 7, 2009, 11:58 PM
    Bobbybee
    Hello,

    I was wondering if you can help with this formula:

    =IF(B2="Long",IF(SUM(AQ2-AP2)>6<30,SUM(AQ2-AP2)))


    I am trying to create a formula that says that if B2 is "Long" then take the sum of AQ2-AP2. If the result is equal to or less than than 6 and less than 8 then give me the result of the sum. So 7 basically but it needs to be between 6 and below 8.

    Can you help?
  • May 8, 2009, 12:33 AM
    JBeaucaire

    Weird way of describing things, you're basically saying AQ2-AP2 needs to equal 7? Are there decimals involved or not, because you actually even said 7 at one point there.

    Also, you say less than 8, but your sample formula shows less than 30.

    Anyway, your basic formula is close, like this though:

    =IF(B2="Long",IF(AND(AQ2-AP2>6,AQ2-AP2<8),AQ2-AP2,0))

  • All times are GMT -7. The time now is 06:24 PM.