Changing the row and column in R1C1 formulae

  • Thread starter Thread starter ccl28
  • Start date Start date
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
 

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

Back
Top