View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.misc
excelnewbie44 excelnewbie44 is offline
external usenet poster
 
Posts: 7
Default VLOOKUP and IF AND problem

Thank you very much, that fixed it!

"PCLIVE" wrote:

Ok.

I was assuming you were using a space in G2 if nothing was found. I've
removed the space in G2=" ". That may work for you. It seems to work or my
end.

=IF(OR(F2=0,G2=0,G2=""),"",F2-G2)


"excelnewbie44" wrote in message
...
Here is the VLOOKUP function I used:
=IF(ISNA(VLOOKUP(A2,TABLE,3,FALSE)),"",VLOOKUP(A15 8,TABLE,3,FALSE))
I tried your suggestions and it still gives me the same error. Any other
suggestions?


"PCLIVE" wrote:

Ok.. One more time. I'll get it right.

=IF(OR(F2=0,G2=0,G2=" "),"",F2-G2)


"PCLIVE" wrote in message
...
Sorry, I made a mistake in the formula for G2" ". The correct formula
should be:
=IF(OR(F20,G20,G2=" "),F2-G2,"")



"PCLIVE" wrote in message
...
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?