Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Toppers
Thanks - actually got round the problem with some code in Access! Regards "Toppers" wrote: Bad day at the office! Sorry Sub CopyDown() ' Dim lastrow As Long lastrow = Cells(Rows.Count, "A").End(xlUp).Row Range("B1").Select Selection.AutoFill Destination:=Range("B1:B" & lastrow), Type:=xlFillDefault Range("B1:B" & lastrow).Copy Range("B1").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Columns(1).Delete End Sub "Toppers" wrote: Hi, Sub CopyDown() ' Dim lastrow As Long lastrow = Cells(Rows.Count, "A").End(xlUp).Row Range("A1:B1").Select lastrow = Cells(Rows.Count, "A").End(xlUp).Row Selection.AutoFill Destination:=Range("A1:B" & lastrow), Type:=xlFillDefault Range("B1:B" & lastrow).Copy Range("B1").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Columns(1).Delete End Sub "Snowsride" wrote: I have a spreadsheet that will contain entries in Column A but the number of rows will vary. In Cell B1 I have a formula based on Cell A1 that I want to copy down in Column B to the last row of the data in Column A. I then need to change the formulae in Column B to values and delete Column A. I need some code to do this. Grateful for any help. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA help to copy variable range | Excel Discussion (Misc queries) | |||
Macro to copy a specified range to a variable range | Excel Programming | |||
VBA Code to name a variable range | Excel Programming | |||
how do I hard code a variable range for a pivot table in vba? | Excel Programming | |||
Code to copy range vs Copy Entire Worksheet - can't figure it out | Excel Programming |