Find last cell used in a specific range

Pat_The_Bat

Board Regular
Joined
Jul 12, 2018
Messages
82
I have used macros previously to find the last row in a column, but right now I'm trying to look at a specific range, ("F52:F80") and find the last row in that particular range. Any help?
Thx! :)
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
This UDF should do it. Just have to pass the range, F52:F80 as the 1 argument to the function.

Code:
Function LastRow(r As Range) As String
Dim Add() As String: Add = Split(r.Address, "$")
LastRow = Add(1) & Evaluate(Replace("LOOKUP(2,1/(@<>""""),ROW(@))", "@", r.Address))
End Function
 
Upvote 0
Maybe...
Code:
Range("F52:F80").Find("*", , xlValues, , xlByRows, xlPrevious).Row
 
Upvote 0

Forum statistics

Threads
1,214,630
Messages
6,120,634
Members
448,973
Latest member
ChristineC

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