Copy a formula

P

pcorcele

=HYPERLINK("[hooks.xlsm]Sheet2!a1","CLICK HERE")
I have the above formula in sheet1, c3
I would like to drag it down to a100 so that the next line would read
=HYPERLINK("[hooks.xlsm]Sheet3!a1","CLICK HERE")
and the next line
=HYPERLINK("[hooks.xlsm]Sheet4!a1","CLICK HERE")
all the way to 100
thanks
 
B

Bruno Campanini

pcorcele wrote :
=HYPERLINK("[hooks.xlsm]Sheet2!a1","CLICK HERE")
I have the above formula in sheet1, c3
I would like to drag it down to a100 so that the next line would read
=HYPERLINK("[hooks.xlsm]Sheet3!a1","CLICK HERE")
and the next line
=HYPERLINK("[hooks.xlsm]Sheet4!a1","CLICK HERE")
all the way to 100
thanks

Try this, may be it works.

=HYPERLINK("[hooks.xlsm]Sheet"&ROW(A1)&"!a1,CLICK HERE")

Bruno
 
P

pcorcele

pcorcele wrote :
=HYPERLINK("[hooks.xlsm]Sheet2!a1","CLICK HERE")
I have the above formula in sheet1, c3
I would like to drag it down to a100 so that the next line would read
=HYPERLINK("[hooks.xlsm]Sheet3!a1","CLICK HERE")
and the next line
=HYPERLINK("[hooks.xlsm]Sheet4!a1","CLICK HERE")
all the way to 100
thanks

Try this, may be it works.

=HYPERLINK("[hooks.xlsm]Sheet"&ROW(A1)&"!a1,CLICK HERE")

Bruno

Thnaks but it does not work
 
B

Bruno Campanini

pcorcele expressed precisely :
Try this, may be it works.

=HYPERLINK("[hooks.xlsm]Sheet"&ROW(A1)&"!a1,CLICK HERE")

Bruno

Thnaks but it does not work

This one?
================================
Public Sub CopyFormula()
Dim TargetRange As Range i As Long

Set TargetRange = [Sheet1!K1]
For i = 1 To 100
TargetRange(i) = "=HYPERLINK(" & Chr(34) & _
"[hooks.xlsm]Sheet" & i & "!A1" & Chr(34) & _
"," & Chr(34) & "CLICK HERE" & Chr(34) & ")"
Next

End Sub
================================

Bruno
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top