C
ccl28
Hi,
I have a few hundred sheet name and formulae change according to the
sheet name. For Inv.1 Pin, Inv.1 Small to Inv.1 Large - Column change
Row remain the same
For Inv.1 Pin go to Inv.2 Pin - Column remain the same Row changing
The above repeat for Inv.1 to Inv.100.
Anyone can help to simplified it?
Example:
Sub Macro1()
Sheets (Inv.1 Pin).Select
Range("C20").FormulaR1C1 = _
"='F:\Model Rebuilt 050706\[Explosion Probabilities.xls]Ign.
Prob'!R34C6"
Range("E33").FormulaR1C1 = _
"='F:\Model Rebuilt 050706\[Explosion Probabilities.xls]Ign.
Prob'!R34C10"
Sheets (Inv.1 Small).Select
Range("C20").FormulaR1C1 = _
"='F:\Model Rebuilt 050706\[Explosion Probabilities.xls]Ign.
Prob'!R34C7"
Range("E33").FormulaR1C1 = _
"='F:\Model Rebuilt 050706\[Explosion Probabilities.xls]Ign.
Prob'!R34C11"
Sheets (Inv.2 Pin).Select
Range("C20").FormulaR1C1 = _
"='F:\Model Rebuilt 050706\[Explosion Probabilities.xls]Ign.
Prob'!R37C6"
Range("E33").FormulaR1C1 = _
"='F:\Model Rebuilt 050706\[Explosion Probabilities.xls]Ign.
Prob'!R37C10"
Sheets (Inv.2 Small).Select
Range("C20").FormulaR1C1 = _
"='F:\Model Rebuilt 050706\[Explosion Probabilities.xls]Ign.
Prob'!R37C7"
Range("E33").FormulaR1C1 = _
"='F:\Model Rebuilt 050706\[Explosion Probabilities.xls]Ign.
Prob'!R37C11"
End Sub
I have a few hundred sheet name and formulae change according to the
sheet name. For Inv.1 Pin, Inv.1 Small to Inv.1 Large - Column change
Row remain the same
For Inv.1 Pin go to Inv.2 Pin - Column remain the same Row changing
The above repeat for Inv.1 to Inv.100.
Anyone can help to simplified it?
Example:
Sub Macro1()
Sheets (Inv.1 Pin).Select
Range("C20").FormulaR1C1 = _
"='F:\Model Rebuilt 050706\[Explosion Probabilities.xls]Ign.
Prob'!R34C6"
Range("E33").FormulaR1C1 = _
"='F:\Model Rebuilt 050706\[Explosion Probabilities.xls]Ign.
Prob'!R34C10"
Sheets (Inv.1 Small).Select
Range("C20").FormulaR1C1 = _
"='F:\Model Rebuilt 050706\[Explosion Probabilities.xls]Ign.
Prob'!R34C7"
Range("E33").FormulaR1C1 = _
"='F:\Model Rebuilt 050706\[Explosion Probabilities.xls]Ign.
Prob'!R34C11"
Sheets (Inv.2 Pin).Select
Range("C20").FormulaR1C1 = _
"='F:\Model Rebuilt 050706\[Explosion Probabilities.xls]Ign.
Prob'!R37C6"
Range("E33").FormulaR1C1 = _
"='F:\Model Rebuilt 050706\[Explosion Probabilities.xls]Ign.
Prob'!R37C10"
Sheets (Inv.2 Small).Select
Range("C20").FormulaR1C1 = _
"='F:\Model Rebuilt 050706\[Explosion Probabilities.xls]Ign.
Prob'!R37C7"
Range("E33").FormulaR1C1 = _
"='F:\Model Rebuilt 050706\[Explosion Probabilities.xls]Ign.
Prob'!R37C11"
End Sub