if then return the column title of first non zero cell

kugzs

New Member
Joined
Jun 1, 2012
Messages
2
Hi,

Ive been trying to work this out for a while but without luck.

I would like to return the column title of the first non zero cell in the row that matches another cell.

So, I would like to get % if the criteria is column A = B

_ * % & $
A 0 0 0 0
B 0 1 0 0
C 0 0 1 0
D 0 1 0 0

Thanks in advance
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Assuming "_" is A1:

F2: =index(a1:e1,1,match(1,a2:e2,0)) <--put in absolute references and drop down. Your second row doesn't have a "1", so you might have to add some error handling.
 
Upvote 0
Thanks for the quick reply.

The non-zero value won't always be 1. Also, I dont want to have to specify the row to be examined. I want to use something like if(A1:A10=B then return the column title of the first non zero cell in the row

Thanks
 
Upvote 0

Forum statistics

Threads
1,219,162
Messages
6,146,660
Members
450,706
Latest member
LGVBPP

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