Results 1 to 6 of 6

Thread: Mixing Formulas

  1. #1

    Lightbulb Mixing Formulas



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hi,

    I know i'm near to the goal formula, but got stuck. I have a chart-1 with date, field number, zones (from 1 to 13), and other columns that don't matter to the formula. Aside, chart-2 that depends on the data from chart-1, that will read, range on column B "field number", looking for specific land number, and column's C - O "Zones" 1-13 , looking for an "X". The formula i have use is the fallowing:
    =IF(AND(COUNTIF(B4:B19,"327N")>0,COUNTIF(C4:C19,"X")>0),1,"")
    =IF(AND(COUNTIF(B4:B19,"327-N")>0,COUNTIF(D419,"X")>0),2,"")
    =IF(AND(COUNTIF(B4:B19,"327-N")>0,COUNTIF(E4:E19,"X")>0),3,"")
    etc, etc, each formula are on different cells on chart-2.

    I want to add that, when "327-N" is found in the first countif on column range B, the next countif in column "C", "D", "E", etc, etc, joust apply on the rows where "327-N" was found.

    Any help will be appreciated
    Thanks in advanced

  2. #2
    Super Moderator Bob Phillips's Avatar
    Join Date
    Mar 2011
    Posts
    1,828
    Articles
    0
    Excel Version
    O365
    Use

    =IF(COUNTIFS(B4:B19,"327N",C4:C19,"X")>0,1,"")

    etc.

  3. #3
    Super Moderator NBVC's Avatar
    Join Date
    May 2011
    Location
    Mississauga, Canada
    Posts
    1,518
    Articles
    0
    Excel Version
    Excel 2016
    Crossposted. Please post links.


  4. #4
    Quote Originally Posted by Bob Phillips View Post
    Use

    =IF(COUNTIFS(B4:B19,"327N",C4:C19,"X")>0,1,"")

    etc.
    Wow!!, That was easy, but i would like to understand it, so it means that adding an "s" to the 'countif', implies using the same row where the criteria is found??

  5. #5
    Super Moderator Bob Phillips's Avatar
    Join Date
    Mar 2011
    Posts
    1,828
    Articles
    0
    Excel Version
    O365
    No, it means multiple criteria can be evaluated together, where the index within the given ranges is the same, i.e. you could test B1:B20 and C1:C20 and B1 and C1 would be evaluated together, B2 and C2, and so on. Or you could test B1:B20 and C11:C30 and B1 and C11 would be evaluated together, B2 and C12 and so on. The ranges don't have to span the same rows (or columns) but they do have to have the same number of rows (or columns).
    Last edited by Bob Phillips; 2015-02-04 at 05:16 PM.

  6. #6
    Quote Originally Posted by Bob Phillips View Post
    No, it means multiple criteria can be evaluated together, where the index within the given ranges is the same, i.e. you could test B1:B20 and C1:C20 and B1 and C1 would be evaluated together, B2 and C2, and so on. Or you could test B1:B20 and C11:C30 and B1 and C11 would be evaluated together, B2 and C12 and so on. The ranges don't have to span the same rows (or columns) but they do have to have the same number of rows (or columns).

    Thanks

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •