Data in columns A or B = number, display in column C

scolty1985

Board Regular
I have 2 columns, either they are both false, or 1 is a number. If one is a number, i want to copy that value to column C.

 0.00032 FALSE 0.000855 FALSE 5E-06 FALSE FALSE 0.00037

<colgroup> </colgroup><tbody>
</tbody>

So column C would be

0.00032
0.000855
5E-06
0.00037

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

MrExcel MVP
I have 2 columns, either they are both false, or 1 is a number. If one is a number, i want to copy that value to column C.

 0.00032 FALSE 0.000855 FALSE 5E-06 FALSE FALSE 0.00037

<tbody>
</tbody>

So column C would be

0.00032
0.000855
5E-06
0.00037

Try...

=LOOKUP(9.99999999999999E+307,A2:B2)

klingklang

New Member
I'm sure there are many better ways to do this, but this dumb one should do in column C:

=IF(AND(ISLOGICAL(A1),ISLOGICAL(B1)), "", IF(ISLOGICAL(A1),B1,A1))

Last edited:

scolty1985

Board Regular
Both work. Thanks very much guys!

Peter_SSs

MrExcel MVP, Moderator

Both work.
But they do return different results if both cells are FALSE, which was a stated possibility. What result do you want if both FALSE?

scolty1985

Board Regular
@Peter_SSs i hadnt picked up on that . Id modified KlingKlangs so that the "" is replaced with a reference to another cell. Pretty sure its working as i need it to now (touch wood)!

Peter_SSs

MrExcel MVP, Moderator
Id modified KlingKlangs so that the "" is replaced with a reference to another cell.

=IF(COUNT(A1:B1),A1+B1,\$J\$1)

scolty1985

Board Regular
@Peter_SSs thats quite a neat way of doing it, thanks very much!!

Replies
3
Views
53
Replies
3
Views
93
Replies
5
Views
58
Replies
16
Views
289
Replies
3
Views
69

1,136,258
Messages
5,674,669
Members
419,520
Latest member
Jennifer4Dillon

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back