VBA to copy offset range

andrewb90

Well-known Member
Joined
Dec 16, 2009
Messages
1,077
Hi all,

I have a macro that filters a table, then I am working on copying select pieces of data to another sheet. I have been able to copy individual cells, but I can't seem to copy an entire range, and any variation I make gives me errors. I'm sure its something very simple I'm doing wrong, so any help would be greatly appreciated. The cell range is selected in a different module. (see second code)

VBA Code:
Sub COPYCARA()
ActiveCell.Offset(1, 0).Activate
Do Until Selection.EntireRow.Hidden = False
If Selection.EntireRow.Hidden = True Then
ActiveCell.Offset(1, 0).Activate
End If
Loop
ActiveCell.Select
Selection.Copy
    Sheets("CAR_STATS").Select

End Sub

#2
VBA Code:
'***********Revenue******************
Sheets("Large_Set").Select
Range("AB1:AL1").Select      'data column choice
Application.Run "Module2.COPYCARA"
Range("C9").Select      'pasting location
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Forum statistics

Threads
1,223,947
Messages
6,175,562
Members
452,652
Latest member
eduedu

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