Help with formula to make cell blank

G

Guest

In T2 I have this formula:

=IF((N2<(U2-80)),U2-(N2+80),0)

In U2 I have this formula:

=IF(A2>0,VLOOKUP(A2'SHEET1'!$A$2:$C$288,3,FALSE)*10,"")

Once I enter a number in A2, all formulas work fine and I get the desired
result. However, when A2 is blank, #VALUE is displayed in T2 because of
formula in U2. I need T2 to be blank until a number is entered in A2. I'm
sure it is a fairly easy fix but I can't work it out. Can someone help with
this? Thanks!
 
A

Arvi Laanemets

Hi

IF(U2="","",MAX(U2-N2-80,0))
or even better
IF(OR(U2="",N2=""),"",MAX(U2-N2-80,0))


Arvi Laanemets
 
H

hgrove

Inspector wrote...
In T2 I have this formula:

=IF((N2<(U2-80)),U2-(N2+80),0)

Unnecessary parentheses. Also, no IF needed. Try

=MAX(0,U2-N2-80)
In U2 I have this formula:

=IF(A2>0,VLOOKUP(A2'SHEET1'!$A$2:$C$288,3,FALSE)*10,"")
...

Looks like you made a typo, and the formula should be

=IF(A2>0,VLOOKUP(A2,SHEET1!$A$2:$C$288,3,FALSE)*10,"")
. . . However, when A2 is blank, #VALUE is displayed in T2 because o formula in
U2. I need T2 to be blank until a number is entered in A2. . . .

Change T2 to

=IF(A2>0,MAX(0,U2-T2-80),""
 

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