looping with formula inside

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i have problem with the following code
could anybody help?thanks in advance
a =worksheets"sheet1".range"a1"
b =worksheets"sheet2"."range a2"
for i to x
a.formula= "= 2*b"
a=offset(0,i)
b=offset(0,i)
alex
 
Dim as as Range, b as Range
Dim x as Long, i as long
Set a =worksheets("sheet1").range("a1")
set b =worksheets("sheet2").range("a2")

x = 10
for i to x
a.formula= "= 2*" & b.Address(external:=True)
set a=a.offset(0,1)
set b=b.offset(0,1)
Next
 
Back
Top