A
Alex St-Pierre
Hello,
I have a database which is like the folowing (sheet #1):
Column 1 is an index (like SSN)
Column 2 to 27 is data
I would like to make a second sheet which is linked to the first sheet using
reference formula. So, the order of the sheet#1 can change without affecting
the sheet #2. I have tried to program that but does't work well.
c = ActiveSheet.Name
ActiveSheet.Copy Before:=Sheets(1)
d = ActiveSheet.Name
Columns("B:B").Insert ' This column will contain the MATCH function
Range("B3:B100").FormulaR1C1 = "=MATCH(RC[-1]," & c & "!A:A,0) 'this
gives #NAME in excel but if I click on, excel calcul the value
Range("C3:AB100").FormulaR1C1 = "=INDEX('" & c & "'!A:AZ,'" & d &
"'!RC[1]," & column()-1 & ")"
Any idea ?
Thanks !
I have a database which is like the folowing (sheet #1):
Column 1 is an index (like SSN)
Column 2 to 27 is data
I would like to make a second sheet which is linked to the first sheet using
reference formula. So, the order of the sheet#1 can change without affecting
the sheet #2. I have tried to program that but does't work well.
c = ActiveSheet.Name
ActiveSheet.Copy Before:=Sheets(1)
d = ActiveSheet.Name
Columns("B:B").Insert ' This column will contain the MATCH function
Range("B3:B100").FormulaR1C1 = "=MATCH(RC[-1]," & c & "!A:A,0) 'this
gives #NAME in excel but if I click on, excel calcul the value
Range("C3:AB100").FormulaR1C1 = "=INDEX('" & c & "'!A:AZ,'" & d &
"'!RC[1]," & column()-1 & ")"
Any idea ?
Thanks !