2 cells 1 with NA and one with a value

mecheet

Board Regular
Joined
Apr 21, 2010
Messages
117
I have 2 columns, which have alternate NAs and values.

I need a formula to show the value of either cell in the column.

e.g. in A1 its NA and B1 its Yes
in A2 its and No and in B2 its NA

I need cell C1 to show yes and C2 to show now.

what formula can be used to show this?
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
sorry wasnt very clear with my example, there are quite a lot of options that the value can be in either column A or B.

but if there is NA in the row i want C to show the value from either A or B

this is specific to yes and no, which i cant be so specfic about due to the many posibly values
 
Upvote 0
Similar to Jason's - if you have Excel 2007+ (and assuming the NA's are actually error values)

=IFERROR(A1,B1)


If the 'NA's are text then

=IF(A1="NA",B1,A1)
 
Last edited:
Upvote 0
i have now realised that some of the data in columns A and B have #VALUE!

is there anyway to incorporate this into the formula.

=IF(ISNA(A1),B1,A1)
 
Upvote 0
If you have excel 2007 or newer try Peter's suggestion of =IFERROR(A1,B1)

otherwise =IF(ISERROR(A1),B1,A1)
 
Upvote 0
Also, if you do not have Excel 2007+, if the non-error values are text, then you could try

=LOOKUP(REPT("z",255),A1:B1)
 
Upvote 0
thanks for your help with this, ive now realised that i need a 3rd column.

How could i do this?

the current formula that im using is

=IF(ISERROR(A2),B2,A2)

i now need to check a 3rd source, but it appears the above is just for 2
 
Upvote 0
If 2 out of 3 cells are errors, then use my formula from post #8 but just make the range at the end 3 cells instead of 2

=LOOKUP(REPT("z",255),A1:C1)

If that does not cover what you have, give some sample data and expected results.
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,286
Members
452,902
Latest member
Knuddeluff

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top