Google
 
Webnews.only-4-geeks.com
Interesting places
news.only-4-geeks.com Forum Index » Excel

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

 
Jump to:  
 
StargateFanNotAtHome
PostPosted: Tue Sep 02, 2008 8:58 pm    Post subject: If text string, then cell has 0 placed in it?
       
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. SurprisedD
 

 
Dave Peterson
PostPosted: Tue Sep 02, 2008 9:23 pm    Post subject: Re: If text string, then cell has 0 placed in it?
       
Maybe...

=if($g2<>"",0,"")

And I changed the text "0" to the number 0.

StargateFanNotAtHome wrote:
Quote:

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. SurprisedD

--

Dave Peterson
 

 
Joerg Mochikun
PostPosted: Wed Sep 03, 2008 3:35 am    Post subject: Re: If text string, then cell has 0 placed in it?
       
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


"StargateFanNotAtHome" <IDon'tAcceptSpam@NoJunkMail.com> wrote in message
news:ntgrb4pg5pek5pp2ngc6pldd9qoahv7n2f@4ax.com...
Quote:
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. SurprisedD
 

Page 1 of 1 .:.

Google
 
Webnews.only-4-geeks.com

Windows Update | C++ | C | PHP | JavaScript | Photoshop | Programming | Windows 2000 | Python | Windows XP | Object | Flash | Flash - ActionScript | Paint Shop Pro | Excel | PowerPoint | Access | Word | Windows 98 | Internet Explorer 6.0 | CorelDraw12 | Java | XML | asm x86 | Linux Mandrake | Linux RedHat | Outlook |  | news from newsgroups |_ | s

Web Templates

Awesome Website Templates ©

spodniobuty texas holdem Zabawki kalkulator kredytowy poker online