find non zero cell and then give output from cell just above

patanjali

New Member
Joined
Feb 8, 2015
Messages
1
ZYX
A10
B4
C7
D2

<tbody>
</tbody>

Hi,

Could you please help me develop a formula for each row as per condition below.

In each row: There is only one cell with value greater than >0. I want to use a formula for each row that picks up which column has a value >0 and then picks up value from Header row.

For example, in row B: first cell is >0, so output should be Z. In row C, since cell X has value >0, it should be give X as output.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
If each record contains just a single numeric value:

=LOOKUP(9.99999999999999E+307,B2:D2,$B$1:$D$1)

Otherwise:

=INDEX($B$1:$D$1,MATCH(TRUE,ISNUMBER(B2:D2),0))

which must be confirmed with control+shift+enter, not just enter.

Are you really wanting > 0, that is, wanting to avoid values like -4 or 0?
 
Upvote 0

Forum statistics

Threads
1,215,543
Messages
6,125,423
Members
449,223
Latest member
Narrian

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