View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default I am having trouble with the IF function and a compound condition

Maybe you mean something like this in say, D100:
=IF(C100="","",IF(AND(OR(A100={369,391}),B100="Gas "),54,C100))

Provided C100 isn't empty (this is just a first check done on C100), D100
will then return the value in C100 as the value_if_False (instead of the
previous value of 18)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"rub" wrote in message
ups.com...
I have a different twist on the same question. For some cells I need
to leave the current value in the cell alone if the IF premise if
false. So in other words instead of the value being 18, I would like
to not change the value of the cell. Any ideas?