Copy selected columns to last row

thedeadzeds

Active Member
Joined
Aug 16, 2011
Messages
361
Office Version
  1. 365
Platform
  1. Windows
Hi Guys, this is porbably simple but i cant seem to figure it out. Is there a way to change the copy range below to include FF4 and FS4:FU4
So the total range would be:
A4:AX4 and FF4 and FS4:FU4


VBA Code:
Sub Copy_Values_Aud()

Application.ScreenUpdating = False
Dim Lastrow As Long
Lastrow = Sheets("Aud Formulas").Cells(Rows.Count, "A").End(xlUp).Row
    Sheets("Aud Formulas").Range("A4:AX" & Lastrow).Copy
    Sheets("Aud Values").Range("A" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Application.Goto Sheets("Menu").Range("A1")
Application.CutCopyMode = False
Application.ScreenUpdating = True

    Sheets("Menu").Select
    Range("I4").Select
    ActiveCell.FormulaR1C1 = "Yes"
    Range("A1").Select


End Sub
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
68,143
Office Version
  1. 365
Platform
  1. Windows
How about
VBA Code:
   Dim Lastrow As Long
   With Sheets("Aud Formulas")
      Lastrow = .Cells(Rows.Count, "A").End(xlUp).Row
      Intersect(.Rows("4:" & Lastrow), .Range("A:AX,FF:FF,FS:FU")).Copy
   End With
 
Solution

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
68,143
Office Version
  1. 365
Platform
  1. Windows
You're welcome & thanks for the feedback.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,193
Messages
5,768,774
Members
425,492
Latest member
blueexcel123

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
Top