Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro Help required | Excel Discussion (Misc queries) | |||
Closing File Error | Excel Discussion (Misc queries) | |||
Urgent Help Required on Excel Macro Problem | Excel Discussion (Misc queries) | |||
vba macro required ? | Links and Linking in Excel | |||
Date macro | Excel Discussion (Misc queries) |