VBA Paste data in the next Blank cell

Villalobo

New Member
Joined
May 9, 2018
Messages
1
Hi all,

First of all thank you for viewing my thread. I am new to VBA, I use Excel everyday but recently I decided to learn about VBA ( just noticed VBA,SQL is the future). I am trying to tell my macro that it should paste the date copied in a different tab below the last cell with data. I tried with the macro recorder the following:

Sub Copy_All()
'
' Copy_All Macro
'


'
Selection.AutoFilter
ActiveSheet.Range("$C$16:$U$451").AutoFilter Field:=19, Criteria1:="No"
Range("C113").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
Sheets("Log").Select
Range("C5").Select
Range(Selection, Selection.End(xlDown)).Select
Range("C24").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub

I cant get it to paste below. I am sorry to bother you all with this, I'm really trying to learn; I'm currently listening to the podcasts from episode 1 etc.

any insight will be greatly appreciated.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hi & welcome to MrExcel.
How about
Code:
Sub Copy_All()
   With ActiveSheet
      If .AutoFilterMode Then .AutoFilterMode = False
      .Range("$C$16:$U$16").AutoFilter Field:=19, Criteria1:="No"
      .AutoFilter.Range.Offset(1).SpecialCells(xlVisible).Copy
      Sheets("new").Range("C" & Rows.Count).End(xlUp).Offset(1).PasteSpecial xlPasteValues
      .AutoFilterMode = False
   End With
   Application.CutCopyMode = False
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,557
Members
449,088
Latest member
davidcom

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