If function with text value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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)
 
=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
 
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
 
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
 
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.
 
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.
 
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?
 
Back
Top