Formula to return column header

  • Thread starter Thread starter XP
  • Start date Start date
X

XP

Using Office 2007 with Windows XP;

I need a formula that can look across several columns and return the value
of the header row for the column that does not contain a zero value.

For example (hopefully this will line up):

A F G H
R1 MISC1 MISC2 MISC3

R3 {formula} 0 25.25 0

If the example above, the formula in A3 should return: MISC2
Since that is the column heading for the column that doesn't have
a zero balance.

I hope this makes sense. Thanks much for your assistance.
 
Hi,

If you saying only one of these columns will have a value then this will do it

=LOOKUP(2,1/(F2:I2<>0),F1:I1)

If there is more than one column with a value it will return the last.

Mike
 
Works exactly as I needed! Thanks!

Mike H said:
Hi,

If you saying only one of these columns will have a value then this will do it

=LOOKUP(2,1/(F2:I2<>0),F1:I1)

If there is more than one column with a value it will return the last.

Mike
 
Back
Top