View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove
 
Posts: n/a
Default IF formula question

"Rubix" wrote...
My question is, I want to add "if" E2 is blank leave R2 blank in
addition to formula below.

This Formula is in R2 cell.

=IF(P2<1,"A",IF(P21,"B",IF(P2<2,"G")))


E2? Do you mean P2?

The formula above would only return "G" when P2=1. If that's what you want,
it'd be LOTS clearer to write it as

=IF(P2<1,"A",IF(P21,"B","G"))

Since P2<1, P21 and P2=1 are exhaustive, the only place you could add
another condition would be as the first test.

=IF(ISBLANK(E2),"",IF(P2<1,"A",IF(P21,"B","G")))