VBA to paste clipboard data to next available row

AGrayson84

New Member
Joined
Mar 21, 2017
Messages
18
Good afternoon/morning/evening everyone! I was hoping someone wouldn't mind helping me with a little code I've had trouble trying to find a working version of on the various forums and articles out there.

I have a Macro that pastes clipboard data specifically to cell A9 on the current worksheet.

The starting cell of each row that the data will be pasted in is column "A". Starting with row 9 (ignoring any rows above), I would like the VBA to check for data in column "O". If cell "O9" contains data, I would like the script to paste clipboard data in the next row ("A10"). The next time I run the macro, if something is in O21, I would like the clipboard data to be pasted starting in cell A22, for example.

Thanks a bunch to anyone that is willing to help... I really appreciate it!


Best Regards,
Andrew
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Hoe about
Code:
Sub t()
Range("A" & Range("O" & Rows.Count).End(xlUp).Offset(1).Row).PasteSpecial
End Sub
 
Upvote 0
Hoe about
Code:
Sub t()
Range("A" & Range("O" & Rows.Count).End(xlUp).Offset(1).Row).PasteSpecial
End Sub

Thanks so much Fluff I really appreciate that! I don't have Excel on the laptop I'm replying from right now, but will that know to ignore rows above 9? I do have some rows above row 9 that don't have anything in column O that I would like to omit from the scope. Anything row 9 and below is what I want to concentrate on. Thanks again Fluff!!!!!!!!!!!!!!!!!!!! :) :)
 
Upvote 0
As long as you have data in O9 or below, then it will work
 
Upvote 0

Forum statistics

Threads
1,215,471
Messages
6,125,002
Members
449,202
Latest member
Pertotal

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