View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
dan dan is offline
external usenet poster
 
Posts: 866
Default MACRO COLUMNS, SKIP ROWS

hi, i am trying to paste formulas down a column without having to paste 1
section at a time. although I have the offset working to do that, I need to
skip rows where column A has a period ".' in that column.
the related item i have is not working for that, as below. thanks.

Sub test() 'alt-T (test)

Dim C4 As String
C4 = Range("C4")

'C4 has: =ROW($A$2058)-ROW($A$228)-1


If Me.Cells(.Row, "A").Value = "." Then Exit Sub
'this line incorrect for this purpose
'need to skip all rows that have a period "." in col A

Range(ActiveCell, ActiveCell.Offset(C4, 0)).Select

Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False


End Sub