Forum Discussion

galley2's avatar
galley2
Copper Contributor
Dec 20, 2023

Issues with Excel IF(And) statement

I am attempting to use an IFS statement that when 2 cells equal the criteria, I want it to return the data from another cell.  What I've tried so far is:

 

=IFS(AND(B7="A", A9="Buck Openings"), X178, $0.00), (B7="Albert", A9="Buck Openings"), X56, $0.00), (B7="Arabella III", A9="Buck Openings"), X59, $0.00, (B7="Ashmere", A9="Buck Openings"), Y65, $0.00)

 

I get an error that it is not a formula.  Can anyone tell me what I am doing wrong - or if there is a better way to do this please?

 

Thanks very much for your assistance.  

7 Replies

  • galley2 

    =IFS(AND(B7="A", A9="Buck Openings"), "X178", AND(B7="Albert", A9="Buck Openings"), "X56",AND(B7="Arabella III", A9="Buck Openings"), "X59", AND(B7="Ashmere", A9="Buck Openings"), "Y65",TRUE, "$0,00")

     

    This works if you want to return texts such as "X178" or "Y65".

    • galley2's avatar
      galley2
      Copper Contributor
      Thank you. I am looking for it to return the contents of cell Y178 or Y65. Any other ideas? Thanks.
      • OliverScheurich's avatar
        OliverScheurich
        Gold Contributor

        galley2 

        Unfortunately i've missed the information that you want to return the data from another cell. @mtarler has meanwhile anserwed the question.

Resources