Insert Text When Blank

C

Chuck N

Lets see if i can explain this. I am doing a certified weight cert and
you input values on one sheet and vlookup functions call the
information onto the actual certificate.

There are three values that we are working with, Gross Weight, Tare
Weight, and Net Weight. Gross is F2, Tare is G2 and Net is H2. When a
value is only entered in Tare, Net says TARE ONLY as the function reads

=IF((F2-G2)>0, F2-G2, "TARE ONLY")
I now need F2 to read "TARE ONLY" as well if F2 is blank.
Conversly, if G2 is blank, F2 and H2 need to read "GROSS ONLY"

Thanks for your help.
 
D

Dave Peterson

Maybe...

=IF(COUNTA(F2:H2)<>1,"",IF(F2<>"","Gross only",
IF(G2<>"","Tare Only","Net Only")))

(all one cell)
 
C

Chuck N

i put it in cell J2, and when i deleted the value for G2, the formul
just calculated the weight over and when i deleted the value for F2 i
said TARE ONLY in H2 because of the forumula I already created

If i change the formula where it has the COUNTA(F2:H2)<> to 2, then i
Shows the values i need in J2. I need them to show up in F2, G2, o
H2. Does that make sense? The formula looks like this now

=IF(COUNTA(F2:H2)<>2,"",IF(F2<>"","Gross only",IF(G2<>"","Tar
Only","Net Only"))

I feel we're getting there
 
D

Dave Peterson

It doesn't make sense to me.

If you put something in F2, then why would you want to overwrite that value with
the string "Gross only"?

And if you do decide to keep the formula in a separate cell (the only way it'll
work), you'll want to change that check back to 1.
 
C

Chuck N

If there is no value in F2 then "TARE ONLY" needs to show up in F2 so
that you cannot handwrite a value in over it when you print out a
certificate. I hope this makes sense.
 
D

Dave Peterson

Each cell can contain a formula or a value--but not both at the same time.
(Yes, the formula will evaluate to a value...)

I think I'd just fill in the "empty" cells with XXXXXXXXXX's. Then the user
will have to overwrite them to enter the real value. If they don't overwrite
them, then you'll see the x's.
 

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