Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you voey much for help!
Best regards Ronnie "Tom Ogilvy" wrote ... Sub CopyFormulas() Dim rng As Range, cell As Range Dim rw As Long rw = 5 On Error Resume Next Set rng = Rows(1).SpecialCells(xlFormulas) On Error GoTo 0 if not rng is nothing then For Each cell In rng cell.Copy Cells(rw, cell.Column).PasteSpecial xlFormulas Next End if End Sub is one way. As written, copies from Row 1 to Row 5. If you wanted to copy from Row 1 to the row with the activeCell Sub CopyFormulas() Dim rng As Range, cell As Range Dim rw As Long rw = ActiveCell.Row On Error Resume Next Set rng = Rows(1).SpecialCells(xlFormulas) On Error GoTo 0 If not rng is nothing then For Each cell In rng cell.Copy Cells(rw, cell.Column).PasteSpecial xlFormulas Next End if End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do i copy values between tables using relative formulas | Excel Discussion (Misc queries) | |||
Copy a file with only values no formulas | New Users to Excel | |||
copy formulas without associated values | Excel Worksheet Functions | |||
Copy Values in a cell (derived from formulas) | Excel Worksheet Functions | |||
Range COPY function - how to copy VALUES and not formulas | Excel Programming |