IF/OR Formula Involving Multiple Cells

boojooo

New Member
Joined
Nov 15, 2012
Messages
33
Hello,

Got a bit of a crazy one, I have 8 cells (A1 - D1 & A2 - D2), cells A1 - D1 are column headers and contain no formulas, while cells A2 - D2 contain formulas that will either return a value or a blank cell. Only one of the A2 - D2 cells will have a value populated for each row. I'm looking for a formula that will determine which cell has a value in it and then return the value of that cells column header. For example, if cell B2 is the only cell populated the formula will return the value in cell B1.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
If your values are numeric & greater then 0 how about
=INDEX(A1:D1,MATCH(0,A2:D2,-1))
 
Upvote 0
Note that the formula is an Array formula and must be confirmed with ctrl+shift+enter.
Excel Workbook
ABCDEF
1Hdr1Hdr2Hdr3Hdr4
2XHdr2
Sheet6
 
Upvote 0
=SUMPRODUCT(--(ISNUMBER(A2:D2)), A1:D1)

or

=SUMIF(A2:D2, "<>", A1:D1)
 
Upvote 0
You've had 3 replies with different formulas to offer. Please quote the responder when you tell us what you observe when trying a formula they offered.
 
Upvote 0
Sorry about that JoeMo & Scott R. Got pulled away in a meeting and wasn't able to provide a better response. I was able to work that equation with your inputs. Thank both of you very much for your time assisting me with this brain bender!
 
Upvote 0
Sorry about that JoeMo & Scott R. Got pulled away in a meeting and wasn't able to provide a better response. I was able to work that equation with your inputs. Thank both of you very much for your time assisting me with this brain bender!
You are welcome - thanks for the reply.
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,695
Members
448,979
Latest member
DET4492

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