Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 67
Default Equal "" when zero has a space after it

I hope this makes sense. I am referencing a cell that has "0 " - or zero with
a space after it. My intent is for example:

A1=0 - In cell b1 I would type =if(a1=0,"",a1)
or
A1=0 (there is a space after it in this instance) - In b1 I type
if(a1=0,"",if(a1=0 ,"",a1)

Does this make sense? It's not recognizing the space after the zero somehow.
I want the "zero with the space after it" yield "" or blank or nothing.
Thanks for your help on this.
--
David P.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Equal "" when zero has a space after it

Does this make sense?

To be honest, no. But here's what you asked for (sort of!):

=IF(A1=0,"",IF(A1="0 ",A1,-----)

The ----- represents the undefined Value_If_False argument for when A1 is
neither 0 or "0 ". If you leave out that agrument it will default to FALSE:

=IF(A1=0,"",IF(A1="0 ",A1)

--
Biff
Microsoft Excel MVP


"David P." wrote in message
...
I hope this makes sense. I am referencing a cell that has "0 " - or zero
with
a space after it. My intent is for example:

A1=0 - In cell b1 I would type =if(a1=0,"",a1)
or
A1=0 (there is a space after it in this instance) - In b1 I type
if(a1=0,"",if(a1=0 ,"",a1)

Does this make sense? It's not recognizing the space after the zero
somehow.
I want the "zero with the space after it" yield "" or blank or nothing.
Thanks for your help on this.
--
David P.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Equal "" when zero has a space after it

I think I got confused on this.

Let's see if this is what you want:

If A1 = 0 *or* "0 " then return blank ("") otherwise return A1.

If that's what you want:

=IF(OR(A1=0,A1="0 "),"",A1)

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Does this make sense?


To be honest, no. But here's what you asked for (sort of!):

=IF(A1=0,"",IF(A1="0 ",A1,-----)

The ----- represents the undefined Value_If_False argument for when A1 is
neither 0 or "0 ". If you leave out that agrument it will default to
FALSE:

=IF(A1=0,"",IF(A1="0 ",A1)

--
Biff
Microsoft Excel MVP


"David P." wrote in message
...
I hope this makes sense. I am referencing a cell that has "0 " - or zero
with
a space after it. My intent is for example:

A1=0 - In cell b1 I would type =if(a1=0,"",a1)
or
A1=0 (there is a space after it in this instance) - In b1 I type
if(a1=0,"",if(a1=0 ,"",a1)

Does this make sense? It's not recognizing the space after the zero
somehow.
I want the "zero with the space after it" yield "" or blank or nothing.
Thanks for your help on this.
--
David P.





  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default Equal "" when zero has a space after it

Another way

=IF(TRIM(A1)="0","",A1)

works if there are more than one trailing space as well


--

Regards,

Peo Sjoblom

"T. Valko" wrote in message
...
I think I got confused on this.

Let's see if this is what you want:

If A1 = 0 *or* "0 " then return blank ("") otherwise return A1.

If that's what you want:

=IF(OR(A1=0,A1="0 "),"",A1)

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Does this make sense?


To be honest, no. But here's what you asked for (sort of!):

=IF(A1=0,"",IF(A1="0 ",A1,-----)

The ----- represents the undefined Value_If_False argument for when A1 is
neither 0 or "0 ". If you leave out that agrument it will default to
FALSE:

=IF(A1=0,"",IF(A1="0 ",A1)

--
Biff
Microsoft Excel MVP


"David P." wrote in message
...
I hope this makes sense. I am referencing a cell that has "0 " - or zero
with
a space after it. My intent is for example:

A1=0 - In cell b1 I would type =if(a1=0,"",a1)
or
A1=0 (there is a space after it in this instance) - In b1 I type
if(a1=0,"",if(a1=0 ,"",a1)

Does this make sense? It's not recognizing the space after the zero
somehow.
I want the "zero with the space after it" yield "" or blank or nothing.
Thanks for your help on this.
--
David P.







  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 390
Default Equal "" when zero has a space after it

In , T. Valko
spake thusly:

Let's see if this is what you want:

If A1 = 0 *or* "0 " then return blank ("") otherwise return A1.

If that's what you want:

=IF(OR(A1=0,A1="0 "),"",A1)


I'm left wondering if the OP has a space merely because he
wants it there for nice formatting purposes. If that is the
case, I'd suggest to him to remove the space and use formatting
options to put "space" there instead. E.g., format as type
"Accounting" is one easy way to get there.)

--
dman


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,231
Default Equal "" when zero has a space after it

"Peo Sjoblom" wrote...
Another way

=IF(TRIM(A1)="0","",A1)

works if there are more than one trailing space as well

....

Unless " 0", " 0", "0 ", "0 ", etc. should be treated differently, in
which case it doesn't work.


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 67
Default Equal "" when zero has a space after it

Thank you all.
--
David P.


"David P." wrote:

I hope this makes sense. I am referencing a cell that has "0 " - or zero with
a space after it. My intent is for example:

A1=0 - In cell b1 I would type =if(a1=0,"",a1)
or
A1=0 (there is a space after it in this instance) - In b1 I type
if(a1=0,"",if(a1=0 ,"",a1)

Does this make sense? It's not recognizing the space after the zero somehow.
I want the "zero with the space after it" yield "" or blank or nothing.
Thanks for your help on this.
--
David P.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
how do I type "itis" without Excel putting a space "it is"? Max Excel Worksheet Functions 4 March 18th 07 10:22 PM
"Space" shows up as zero in graphs. What doesnt show up as zero? jdwj Charts and Charting in Excel 2 February 14th 07 10:17 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM


All times are GMT +1. The time now is 01:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"