How to lookup first non-zero value and return corresponding column header in Excel?
Supposing, you have a range of data, now, you want to return the column header in that row where the first non-zero value occurs as following screenshot shown, this article, I will introduce a useful formula for you to deal with this task in Excel.
Lookup the first non-zero value and return corresponding column header with formula
Lookup the first non-zero value and return corresponding column header with formula
To return the column header of the first non-zero value in a row, the following formula may help you, please do as this:
Enter this formula: =INDEX($B$1:$I$1,MATCH(TRUE,INDEX(B2:I2<>0,),0)) into a blank cell where you want to locate the result, K2, for example, and then drag the fill handle down to the cells that you want to apply this formula, and all the corresponding column headers of the first non-zero value are returned as following screenshot shown:
Note: In the above formula, B1:I1 is the column headers which you want to return, B2:I2 is the row data that you want to lookup the first non-zero value.
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!















