Return row number from an array/name range

PrashanthKumar123

New Member
Joined
May 1, 2021
Messages
38
hi - In my project, I am encountering a array/name range like the below with 0s and 1s. There maybe multiple 1s in a single row, but all other rows will only have 0s. I am looking for a formula that returns the row number which has the 1s, i.e., in this case, row 2. Is there a way to do this?

Once I have the row number, I plan to use this in an index function.

0​
0​
0​
0​
0​
1​
1​
1​
0​
0​
0​
0​
0​
0​
0​
0​
0​
0​
0​
0​
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Maybe
+Fluff 1.xlsm
ABCDEF
10000
20111
300002
40000
50000
Data
Cell Formulas
RangeFormula
F3F3=AGGREGATE(15,6,(ROW(A1:D5)-ROW(A1)+1)/(A1:D5>0),1)
 
Upvote 0
If your range is MyRange and there are 0 or one in every cell of myRange, try

=MAX(ROW(myRange)*myRange)
 
Upvote 0

Forum statistics

Threads
1,214,978
Messages
6,122,545
Members
449,089
Latest member
davidcom

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