Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
change "true" and "false" to "availble" and "out of stock" | Excel Worksheet Functions | |||
how do I type "itis" without Excel putting a space "it is"? | Excel Worksheet Functions | |||
"Space" shows up as zero in graphs. What doesnt show up as zero? | Charts and Charting in Excel | |||
HELP on "left","right","find","len","substitute" functions | Excel Discussion (Misc queries) | |||
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next | New Users to Excel |