Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Referencing other sheet using column numbers

Status
Not open for further replies.

Dons1000

Programmer
Jul 18, 2006
17
0
0
US
I'm writing a macro in Excel to move some data into another worksheet. How do you set a reference in excel to a different worksheet and use numbers instead of letters

I don't want to use =sheet1!C3 but something like
=sheet1!(3,3)
 



Hi,

Do you want to enter FORMULAS in the cell or VALUES?

For FORMULAS...
Code:
  Sheet2.Cells(1,1).Formula = "=sheet1!R3C3"
for VALUES...
Code:
  Sheet2.Cells(1,1).value = sheet1.cells(3,3).value


Skip,
[sub]
[glasses] [red][/red]
[tongue][/sub]
 
Formulas but not using the R3C3 reference instead using numbers.
 


A1 notation or R1C1 notation in formulas as your only choices in formulas.

You could do...
Code:
with sheet1.cells(3,3)
  Sheet2.Cells(1,1).formula = "=" & .parent.name & "!" & .address(false, false)
end with




Skip,
[sub]
[glasses] [red][/red]
[tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top