Thread: Macro required
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
PCOR
 
Posts: n/a
Default 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