View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike Fogleman[_2_] Mike Fogleman[_2_] is offline
external usenet poster
 
Posts: 206
Default Autofilling a formula down

No need to autofill and paste special, just assign values to the cells:

Sub test()
Dim LRowA As Long, LRowB As Long
Dim rng As Range, c As Range

LRowA = Cells(Rows.Count, "A").End(xlUp).Row
LRowB = Cells(Rows.Count, "B").End(xlUp).Row

Set rng = Range("B" & LRowB + 1 & ":B" & LRowA)

For Each c In rng
'puts a value in column B
'that is twice the value of column A
c.Value = c.Offset(, -1) * 2
' puts a value in column C
' that is 1 greater than column B
c.Offset(, 1).Value = c.Value + 1
Next
End Sub

Mike F
"CLR" wrote in message
...
Hi All.......
I have three columns, column A is about 3500 rows, (exact quantity
unknown),
columns B and C have the same quantity of rows each but are a few hundred
less than column A, again (exact quantity unkown) I would like to find
the
lower points of cols B and C and insert a separate fomula into each column
and autofill both formulas down as far as there is data in column A, then
Copy PasteSpecial Values to get rid of the formulas.....thus giving me
3
columns of data of all the same length.

Any help would be appreciated.

Vaya con Dios,
Chuck, CABGx3