![]() |
Macro required
Hi All
I would sure like to have a macro that will do the following: 1. Select B1 2. Run down the B col until it finds a blank 3. Then paste in that blank line (starting a col B )what has been placed in the clipboard. Would appreciate any help Thanks |
Macro required
Assuming that the copy and paste are both in the same sheet and the data to
be copied when the Macro is invoked is highlighted then try: Sub CopyIt() Dim Here As Long 'Set Here to last Row +1 for no blank cells Here = Cells(Rows.Count, 2).End(xlUp).Row + 1 On Error Resume Next '(If no blank cells) Here = Columns("B").SpecialCells(xlCellTypeBlanks).Row Selection.Copy Destination:=Cells(Here, 2) Application.CutCopyMode = False End Sub -- HTH Sandy Replace@mailinator with @tiscali.co.uk "PCOR" wrote in message .. . Hi All I would sure like to have a macro that will do the following: 1. Select B1 2. Run down the B col until it finds a blank 3. Then paste in that blank line (starting a col B )what has been placed in the clipboard. Would appreciate any help Thanks |
Macro required
Thanks forthe help but.....
What I really need is: I want a macro that will run down Col B ,find the first blank row and paste what ever is in the clipboard. Any help appreciated.\ "Sandy Mann" wrote in message ... Assuming that the copy and paste are both in the same sheet and the data to be copied when the Macro is invoked is highlighted then try: Sub CopyIt() Dim Here As Long 'Set Here to last Row +1 for no blank cells Here = Cells(Rows.Count, 2).End(xlUp).Row + 1 On Error Resume Next '(If no blank cells) Here = Columns("B").SpecialCells(xlCellTypeBlanks).Row Selection.Copy Destination:=Cells(Here, 2) Application.CutCopyMode = False End Sub -- HTH Sandy Replace@mailinator with @tiscali.co.uk "PCOR" wrote in message .. . Hi All I would sure like to have a macro that will do the following: 1. Select B1 2. Run down the B col until it finds a blank 3. Then paste in that blank line (starting a col B )what has been placed in the clipboard. Would appreciate any help Thanks |
All times are GMT +1. The time now is 08:44 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com