ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   compare 2 cells then copy value if they are different (https://www.excelbanter.com/excel-discussion-misc-queries/230954-compare-2-cells-then-copy-value-if-they-different.html)

Gwen B

compare 2 cells then copy value if they are different
 
I want to compare two cells, 1 contains an address, the other may or may not
contain data. If the 2nd cell is blank I want to copy the address from the
1st cell. Is there a formula to do this?

Bob I

compare 2 cells then copy value if they are different
 
And if the 2nd cell is NOT blank?

Gwen B wrote:
I want to compare two cells, 1 contains an address, the other may or may not
contain data. If the 2nd cell is blank I want to copy the address from the
1st cell. Is there a formula to do this?



David Biddulph[_2_]

compare 2 cells then copy value if they are different
 
If, in addition to what you have specified, when the 2nd cell is not blank
you want to use the value from the 2nd cell, then try
=IF(B2="",A2,B2) or
=IF(B2<"",B2,A2)
--
David Biddulph

"Gwen B" <Gwen wrote in message
...
I want to compare two cells, 1 contains an address, the other may or may
not
contain data. If the 2nd cell is blank I want to copy the address from
the
1st cell. Is there a formula to do this?




Marcelo

compare 2 cells then copy value if they are different
 
it is not possible without an auxiliar column, assuming the formulas that
David sugest you but using it on column C.

or you must to type a different formula in each cell to preserve original
values on column B.

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"Gwen B" escreveu:

I want to compare two cells, 1 contains an address, the other may or may not
contain data. If the 2nd cell is blank I want to copy the address from the
1st cell. Is there a formula to do this?



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

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