Find last row with a numeric value in a range

JCK101

New Member
Joined
Feb 1, 2012
Messages
32
Office Version
  1. 2019
Platform
  1. Windows
I'm trying to find the last row with a numeric value in a range (R8:X57).

I tried this: =MIN(ROW(R8:X57))+ROWS(R8:X57)-1

The result was 57 instead of 11 since the rows 12 to 57 have no values, but do have formulas.

I tried =LOOKUP(2,1/(LEN(R:X)>0),ROW(INDIRECT("1:65536"))) the result is 7 instead of 11, 7 is the heading row.

I tried this next one, it works, but it is too UGLY: =MAX(LOOKUP(2,1/(LEN(R:R)>0),ROW(INDIRECT("1:65536"))),LOOKUP(2,1/(LEN(S:S)>0),ROW(INDIRECT("1:65536"))), LOOKUP(2,1/(LEN(T:T)>0),ROW(INDIRECT("1:65536"))),LOOKUP(2,1/(LEN(U:U)>0),ROW(INDIRECT("1:65536"))),LOOKUP(2,1/(LEN(V:V)>0),ROW(INDIRECT("1:65536"))),LOOKUP(2,1/(LEN(W:W)>0),ROW(INDIRECT("1:65536"))),LOOKUP(2,1/(LEN(X:X)>0),ROW(INDIRECT("1:65536"))))

Any help will be appreciated.

Regards,
JC
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Forum statistics

Threads
1,215,401
Messages
6,124,705
Members
449,182
Latest member
mrlanc20

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