Help with adding a bit to an existing If Statement

R

raehippychick

I have a inherited a spreadsheet with formulae in it - this one gives m
a number in column B which is great but I would like to add something t
it so that it also looks at column P and if column P does *not* have th
word "Unrefreshed" the formula below will return a value of zero

=IF(ISBLANK(G30),"",VLOOKUP(G30,MachineData,3,FALSE))

Many thanks in advanc
 
J

Jack Schitt

Assuming you aret just testing P30 for the single word "Unrefreshed", then
something like:

=NOT(P30="Unrefreshed)*IF(ISBLANK(G30),"",VLOOKUP(G30,MachineData,3,FALSE))
 
J

Jack Schitt

Small typo, missed a quote.
For
="Unrefreshed)
Read
="Unrefreshed")


Jack Schitt said:
Assuming you aret just testing P30 for the single word "Unrefreshed", then
something like:

=NOT(P30="Unrefreshed)*IF(ISBLANK(G30),"",VLOOKUP(G30,MachineData,3,FALSE))
 
A

Andy Brown

I have a inherited a spreadsheet with formulae in it - this one gives me
a number in column B which is great but I would like to add something to
it so that it also looks at column P and if column P does *not* have the
word "Unrefreshed" the formula below will return a value of zero

You can use a technique commonly called "nested IF", such as

=IF(ISBLANK(G30),"",IF(P30<>"Unrefreshed",0,VLOOKUP(G30,MachineData,3,FALSE)
))

Rgds,
Andy
 
J

Jack Schitt

BTW
Andy's solution is better than mine if P30 may contain an error value.
Not entirely clear from your post which takes priority between testing P30
for "Unrefreshed" and testing G30 for blankness. If you want both to return
0 (instead of "" for G30) then the priority will not matter (although you
will have to change the "" to 0 in the formula)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top