Select last used cell And it's Offset

Peteor

Board Regular
Joined
Mar 16, 2018
Messages
152
I would like to use "Range("G" & Rows.Count).End(xlUp)" to determine the last used cell in Range("G"), and select it AND its "Offset(1,0)". I am running into issues when pairing it with the Autofill code from Macro Recorder. See below:

What I need to do (This is only an example, and does not use the method shown above):
Range("L2").Select
Selection.AutoFill Destination:=Range("L2:L450"), Type:=xlFillDefault
Range("L2:L450").Select

BUT, I am having issues pairing the method which selects the last used cell AND it's row offset of 1. I.E. see below:

Range("G" & Rows.Count).End(xlUp).Select
Selection.AutoFill Destination:='Issues here, Type:=xlFillDefault
'Issues here
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
How about
Code:
   With Range("G" & Rows.Count).End(xlUp)
      .Offset(0).AutoFill .Resize(2), xlFillDefault
   End With
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,213,495
Messages
6,113,992
Members
448,538
Latest member
alex78

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