INDEX/MATCH to find the last cell in a row range that is not zero?

excelos

Well-known Member
Joined
Sep 25, 2011
Messages
591
Office Version
  1. 365
Platform
  1. Windows
Hello

I have this row 1:
0,0,0,0,2,0,0,0,0,3,0,0

I want to put a formula in the row below (row 2) that will return the first non zero value searching from right to left in the range from $A$1 to [current column, row1]

Any idea?

Thanks!
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
What Excel version are you using? That will determine what functions are available to use.
I suggest that you update your Account details (click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
I'm not sure why you are trying to specify what functions to use. Wouldn't any function(s) that get the result do?

What about this (expand beyond column Z if you might have more than 26 columns with numbers)

20 10 22.xlsm
ABCDEFGHIJKLMN
1000020000300
23
Last non-zero
Cell Formulas
RangeFormula
A2A2=LOOKUP(9.9E+307,A1:Z1/(A1:Z1<>0))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,397
Messages
6,119,271
Members
448,882
Latest member
Lorie1693

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