Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi,
I have a formula that needs to be pasted into every 5th row, only if there is no existing formula in that target row. I have about 30000 rows of data & 10 such spreadsheets. To hasten this task, I wrote this code, but it is missing out pasting the formula on some rows etc... Sub Macro2() Dim Count As Long Range("B5:M5").Copy For Count = 0 To 70 Step 5 If Range("B5").Offset(Count, 0).HasFormula Then Count = Count + 5 Else Range("B5").Offset(Count, 0).PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False Count = Count + 5 End If Next Count End Sub TIA Neil |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pasting Same Formula | Excel Programming | |||
copying and pasting a formula | Excel Worksheet Functions | |||
reading a formula and pasting it | Excel Programming | |||
Pasting formula as text | Excel Programming | |||
Pasting formula with defined name | Excel Programming |