Skip to main content
Solved

IF AND For Two Conditons Not Working

  • October 31, 2023
  • 3 replies
  • 31 views

Forum|alt.badge.img+3

I'm trying to get two conditons from two fields that contain certain text that if True produces a duration value.  I can get it to work work one condition but when I add the second it will not work.  Can someone see what I'm doing wrong?

 

This Formula works:
 
IF(FIND("ABC",Origin),3600,0)
 
But when I add the second condition it shows all 0's on the fields that contain "ABC" and the fields the doesn't contain"ABC" gets the 3600:
 
IF(AND(FIND("ABC",Origin)),AND(FIND("New",{Lane class}),3600,0))
 
Thanks

 

Best answer by Kenneth_Raghuna

I believe you are using the AND() function incorrectly. You do not need to call it twice, you just need to put both conditions within the function. (ie. AND(Condition 1, Condition 2))

This should work:

 

IF(AND(FIND("ABC",Origin), FIND("New",{Lane class})),3600,0)

 

3 replies

Kenneth_Raghuna
Forum|alt.badge.img+20

I believe you are using the AND() function incorrectly. You do not need to call it twice, you just need to put both conditions within the function. (ie. AND(Condition 1, Condition 2))

This should work:

 

IF(AND(FIND("ABC",Origin), FIND("New",{Lane class})),3600,0)

 


Forum|alt.badge.img+3
  • Author
  • New Participant
  • October 31, 2023

Thanks for the reply, but now I don't get anything in the field.


Kenneth_Raghuna
Forum|alt.badge.img+20

Thanks for the reply, but now I don't get anything in the field.


Single parenthesis was out of place. I edited the response, should work now.