View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Macro, Copy Selected Cells Down a Column

Glad you got it working.

DB33 wrote:

Dave,
I can't thank you enough, My column B is always full, and I used your code
and it works perfectly.
You saved me hours of work.

Greatly appreciated. Have a good week :P

Dave Peterson wrote:
If you can tell the macro how to figure out what the last row should be, then
yep.

Can you pick out a column that always has data in it when the row is used?

For instance, if you said A always had data in it:

Option Explicit
Sub Testme01()

Dim Rng As Range
Dim LastCell As Range
Dim LastRow As Long

With ActiveSheet
Set Rng = Selection.Columns(1)
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
Set LastCell = .Cells(LastRow, Rng.Column)

Rng.AutoFill _
Destination:=.Range(Rng, LastCell), Type:=xlFillCopy
End With
End Sub

But I don't know enough about your file to really guess.

Ok, here's another thing Ijust noticed, I decided to unhide my Columns D & E,
and when I fill out C, then I can do D, E, F no problem.. as long as the

[quoted text clipped - 3 lines]
say for example, fill out G, and then C, since there are really no link
between the columns anyways.. they can all have different values.



--

Dave Peterson