View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Joe User[_2_] Joe User[_2_] is offline
external usenet poster
 
Posts: 905
Default If function help

"Pam" wrote:
The iferror formula works, but I need to add a formula
that when B15 is blank then it will return a blank in cell
C17


I confess that I do not have Excel 2007, so I cannot test this. But I see
no conceptional reason why the following would not work:

=IFERROR(IF(B15="", "", VLOOKUP(B15,D40:E42,2,FALSE)),
"Invalid Shipping option")

IFERROR simply returns the second parameter if there is an error in the
first parameter. Obviously, there is no error if B15 is blank and we provide
for that case in the first expression.

IFERROR might still be useful in this case if VLOOKUP might fail for other
reasons, e.g. B15 contains a value that does not match D40:D42.



----- original message -----

"Pam" wrote:
I have a current formula that I need to nest with another IF formula....
=IFERROR(VLOOKUP(B15,D40:E42,2,FALSE),"Invalid Shipping option")

D40:E42 are shipping options with cost amounts that are input into cell c17

The iferror formula works, but I need to add a formula that when B15 is
blank then it will return a blank in cell C17