ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   If function with text value (https://www.excelbanter.com/excel-discussion-misc-queries/158971-if-function-text-value.html)

michelle

If function with text value
 
I am trying to copy one cell to another with a if function. And if there is
nothing in the cell, I would like the other cell to be blank. I have tried
using this formula, but it gives me a #value error message.

Example:

A1=name
B1=name

My Formula: if(A1=" "," ",A1)

Peo Sjoblom

If function with text value
 
=IF(A1="","",A1)

if you use the result of the formula in a calculation don't use it like

=A1+C2

use

=SUM(A1,C2)


that will ignore text and not return value errors


--


Regards,


Peo Sjoblom



"Michelle" wrote in message
...
I am trying to copy one cell to another with a if function. And if there
is
nothing in the cell, I would like the other cell to be blank. I have
tried
using this formula, but it gives me a #value error message.

Example:

A1=name
B1=name

My Formula: if(A1=" "," ",A1)




Gord Dibben

If function with text value
 
In B1 enter =IF(A1="","",A1)

Note: don't use spaces between the double quotes unless you are looking for a
space.

But in your case you should not have gotten a #value error if you are entering
the formula in B1.


Gord Dibben MS Excel MVP


On Wed, 19 Sep 2007 15:42:03 -0700, Michelle
wrote:

I am trying to copy one cell to another with a if function. And if there is
nothing in the cell, I would like the other cell to be blank. I have tried
using this formula, but it gives me a #value error message.

Example:

A1=name
B1=name

My Formula: if(A1=" "," ",A1)


Fred Smith

If function with text value
 
If there's nothing in the cell, and you want the result to be nothing, you don't
have to test for it. Just copy it. In B1, put:

=a1

--
Regards,
Fred


"Michelle" wrote in message
...
I am trying to copy one cell to another with a if function. And if there is
nothing in the cell, I would like the other cell to be blank. I have tried
using this formula, but it gives me a #value error message.

Example:

A1=name
B1=name

My Formula: if(A1=" "," ",A1)




David Biddulph[_2_]

If function with text value
 
I'm confused, Fred, and I expect the OP will be too.
If A1 is empty and I put =A1 in B1, then in B1 I get a zero, which isn't
what I think the OP wants.
I think she needs =IF(A1="","",A1), as others have suggested.
--
David Biddulph

"Fred Smith" wrote in message
...
If there's nothing in the cell, and you want the result to be nothing, you
don't have to test for it. Just copy it. In B1, put:

=a1

--
Regards,
Fred


"Michelle" wrote in message
...
I am trying to copy one cell to another with a if function. And if there
is
nothing in the cell, I would like the other cell to be blank. I have
tried
using this formula, but it gives me a #value error message.

Example:

A1=name
B1=name

My Formula: if(A1=" "," ",A1)






Fred Smith

If function with text value
 
You're right. To my simple mind, =if(a1="","",a1) is the same as =a1. But to
Excel, it's not. When a1 is blank, =a1 results in zero, not blank.

--
Regards,
Fred


"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
I'm confused, Fred, and I expect the OP will be too.
If A1 is empty and I put =A1 in B1, then in B1 I get a zero, which isn't what
I think the OP wants.
I think she needs =IF(A1="","",A1), as others have suggested.
--
David Biddulph

"Fred Smith" wrote in message
...
If there's nothing in the cell, and you want the result to be nothing, you
don't have to test for it. Just copy it. In B1, put:

=a1

--
Regards,
Fred


"Michelle" wrote in message
...
I am trying to copy one cell to another with a if function. And if there is
nothing in the cell, I would like the other cell to be blank. I have tried
using this formula, but it gives me a #value error message.

Example:

A1=name
B1=name

My Formula: if(A1=" "," ",A1)








Carla Pemberton

If function with text value
 
I tried that formula and it just enters the text of the formula into the new
cell instead of the text of the original cell. WHat am I doing wrong?

"Fred Smith" wrote:

You're right. To my simple mind, =if(a1="","",a1) is the same as =a1. But to
Excel, it's not. When a1 is blank, =a1 results in zero, not blank.

--
Regards,
Fred


"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
I'm confused, Fred, and I expect the OP will be too.
If A1 is empty and I put =A1 in B1, then in B1 I get a zero, which isn't what
I think the OP wants.
I think she needs =IF(A1="","",A1), as others have suggested.
--
David Biddulph

"Fred Smith" wrote in message
...
If there's nothing in the cell, and you want the result to be nothing, you
don't have to test for it. Just copy it. In B1, put:

=a1

--
Regards,
Fred


"Michelle" wrote in message
...
I am trying to copy one cell to another with a if function. And if there is
nothing in the cell, I would like the other cell to be blank. I have tried
using this formula, but it gives me a #value error message.

Example:

A1=name
B1=name

My Formula: if(A1=" "," ",A1)








David Biddulph[_2_]

If function with text value
 
You've got the cell formatted as Text. Format it as General, press F2 to
get into edit mode, then Enter.
--
David Biddulph

"Carla Pemberton" <Carla wrote in
message ...
I tried that formula and it just enters the text of the formula into the
new
cell instead of the text of the original cell. WHat am I doing wrong?

"Fred Smith" wrote:

You're right. To my simple mind, =if(a1="","",a1) is the same as =a1. But
to
Excel, it's not. When a1 is blank, =a1 results in zero, not blank.

--
Regards,
Fred


"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
I'm confused, Fred, and I expect the OP will be too.
If A1 is empty and I put =A1 in B1, then in B1 I get a zero, which
isn't what
I think the OP wants.
I think she needs =IF(A1="","",A1), as others have suggested.
--
David Biddulph

"Fred Smith" wrote in message
...
If there's nothing in the cell, and you want the result to be nothing,
you
don't have to test for it. Just copy it. In B1, put:

=a1

--
Regards,
Fred

"Michelle" wrote in message
...
I am trying to copy one cell to another with a if function. And if
there is
nothing in the cell, I would like the other cell to be blank. I have
tried
using this formula, but it gives me a #value error message.

Example:

A1=name
B1=name

My Formula: if(A1=" "," ",A1)











All times are GMT +1. The time now is 06:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com