How to display a value in say B2 in B3 IF a value in B1 is true

  • Thread starter Thread starter Guest
  • Start date Start date
In B3, use the formula =IF(B1,B2,"") , assuming that you want B3 to be blank
if B1 is false.
 
Thanks Bob,
My question was not clear. I need to copy the value contained in cell B2
into B3 if the value in B1 is true.

Les Palmer
 
Thanks David.
My question was not clear. I need to copy the value in cell B2 into B3 if
the value in B1 is true.

Les Palmer
 
Bob's formula does that, though it assumes that by True you mean TRUE< a
non-zero number, or blank. But your followup isn't any more clear.

Perhaps more explicitly:

B3: =IF(B1=TRUE,B2,"")

If you have other requirements, you might be more give more detail
 
Thanks JE,
I am afraid this formula does not do what I need.
Cell B1 contains 1
Cell B2 Contains 25
My idea was : =(IFB1=1,"B2","") if true display the contents of cell B2 in
cell b3 and if false leave cell B3 blank. The problem is that B2 is displayed
and not the contents of cell B2.
I hope this is clearer!

Thanks to all who replied,

Les Palmer
 
To "copy" B2 content without having a formula in B3 would require VBA code.

Formulas cannot copy to a blank cell.


Gord Dibben MS Excel MVP
 
You have "B2" in quotes so Excel will return that as a text string.

Re-write as =IF(B1=1,B2,"")

or as per the other example you received.


Gord Dibben MS Excel MVP
 
Hi

You have your bracket in the wrong place, which I assume is a typo, not
a copied formula.
You will see B2 in cell B3, because you have put quotes around the
value, therefore you are telling Excel to literally use "B2"

=IF(B1=1,B2,"")

David's initial response would have done the same - had you tried it.
 
Back
Top