View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
PCLIVE PCLIVE is offline
external usenet poster
 
Posts: 1,311
Default VLOOKUP and IF AND problem

You might try this:

=IF(OR(F20,G20,G2" "),F2-G2,"")

Regards,
Paul
"excelnewbie44" wrote in message
...
I am trying to using the following function: =IF(AND(F20,G20),F2-G2,"")
to
calculate the difference between F2 & G2 if there is a value in both, if
not
I want it to return a blank cell. In the cell G2 I have a Vlookup function
that looks up values in a table, if there is not value for what it is
looking
up I have it returning a blank answer. When I do this and it returns a
blank
answer in G2, my answer to my equation gives me a #VALUE!. I have also
tried
the following fuction: =IF(ISBLANK(F2),"",IF(ISBLANK(G2),"",F2-G2)) and
this
returns the same answer. Any idea of how I can fix this problem?