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

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?