If text string, then cell has 0 placed in it?

  • Thread starter StargateFanNotAtHome
  • Start date
S

StargateFanNotAtHome

If there is a text string in cell G2, how can J2 be made to be "0".

I don't know how to do this either with conditional formatting or via
a formula. I managed to get this far:
=IF($G2>0,"0")
but thsi doesn't work if there is no specific text string in G2 and
the regular data is there so that an actual price must be in that cell
vs. that formula.

It's tricky to explain. If the row has a regular product, then the
cell in column J would have a list price in it. But in some cases,
there will be a text string, specifically:

"ITEMS REQUESTED FROM GENERAL STOCK"

so the pertinent cell in column J for that row would just have a zero
in it so the rest of the formulas in the sheet work.

How can this be done, though?

Thx. :eek:D
 
J

Joerg Mochikun

Results in "0" if G2 is text or blank, otherwise shows number value of G2:
=N(G2)

Results in "0" if G2 is text, blank cell if G2 is blank, otherwise shows
number value of G2:
=IF(ISBLANK(G2),"",N(G2))

Cheers,
JM
 

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