Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy formulas from row above...
Hi,
I have some code assigned to a button that copies data from one work sheet to the first blank cells in certain columns in a second worksheet. What I now want to do is fill the remainder of this "new" row with the formulas from the row above for columns G to M. Anyone have any ideas how to do this. Many thanks Simon Code for copying the data: Private Sub Copy_Data_Click() Dim rng As Range, cell As Range On Error Resume Next With Worksheets("Data") Set rng = .Columns(5).SpecialCells(xlBlanks) End With On Error GoTo 0 If rng Is Nothing Then Exit Sub For Each cell In rng If Application.CountA(cell.Resize(3, 1)) = 0 Then Worksheets("Welcome").Range("C20").Copy _ Destination:=cell Exit For End If Next With Worksheets("Data") Set rng = .Columns(6).SpecialCells(xlBlanks) End With On Error GoTo 0 If rng Is Nothing Then Exit Sub For Each cell In rng If Application.CountA(cell.Resize(3, 1)) = 0 Then Worksheets("Welcome").Range("C22").Copy _ Destination:=cell Exit For End If Next End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
automatically copy formulas down columns or copy formulas all the | Excel Worksheet Functions | |||
How do I copy formulas but using the same range each time I copy | Excel Worksheet Functions | |||
copy formulas from a contiguous range to a safe place and copy them back later | Excel Programming | |||
copy without formulas | Excel Programming | |||
Range COPY function - how to copy VALUES and not formulas | Excel Programming |