I am working with a project right now with sheets from 1 - 280, but my problem is that when a new project starts the sheets will be renamed to something else.. EX. P1110-01.
I do not want to make a new macro every single time I work with a project, because I work with like 600 projects.
Can anyone point me in a direction to create a macro so that when the sheets are renamed, it retrieves the new sheet names and edits the old macro. Not sure if it is possible though.
Formula:
Sub PileLocationFix_INSTALLandRECEIVED()
'
' PileLocationFix_INSTALLandRECEIVED Macro
' Fixes the #REF problems.
'
' Keyboard Shortcut: Ctrl+q
'
ActiveCell.FormulaR1C1 = "='[Pile Records.xlsx]1'!R70C[-1]"
Range("C6").Select
Selection.AutoFill Destination:=Range("C6:C306"), Type:=xlFillDefault
Range("C6:C306").Select
ActiveWindow.SmallScroll Down:=-12
ActiveWindow.ScrollRow = 288
ActiveWindow.ScrollRow = 285
ActiveWindow.ScrollRow = 279
ActiveWindow.ScrollRow = 268
ActiveWindow.ScrollRow = 245
ActiveWindow.ScrollRow = 218
ActiveWindow.ScrollRow = 207
ActiveWindow.ScrollRow = 194
ActiveWindow.ScrollRow = 182
ActiveWindow.ScrollRow = 173
ActiveWindow.ScrollRow = 167
ActiveWindow.ScrollRow = 161
ActiveWindow.ScrollRow = 156
ActiveWindow.ScrollRow = 152
ActiveWindow.ScrollRow = 148
ActiveWindow.ScrollRow = 146
ActiveWindow.ScrollRow = 142
ActiveWindow.ScrollRow = 141
ActiveWindow.ScrollRow = 137
ActiveWindow.ScrollRow = 133
ActiveWindow.ScrollRow = 125
ActiveWindow.ScrollRow = 120
ActiveWindow.ScrollRow = 114
ActiveWindow.ScrollRow = 106
ActiveWindow.ScrollRow = 97
ActiveWindow.ScrollRow = 87
ActiveWindow.ScrollRow = 78
ActiveWindow.ScrollRow = 67
ActiveWindow.ScrollRow = 59
ActiveWindow.ScrollRow = 51
ActiveWindow.ScrollRow = 42
ActiveWindow.ScrollRow = 34
ActiveWindow.ScrollRow = 27
ActiveWindow.ScrollRow = 19
ActiveWindow.ScrollRow = 10
ActiveWindow.ScrollRow = 6
Range("C6").Select
ActiveCell.FormulaR1C1 = "='[Pile Records.xlsx]1'!R[64]C[-1]"
Range("C7").Select
ActiveCell.FormulaR1C1 = "='[Pile Records.xlsx]2'!R[63]C[-1]"
.
.
.
.
.
ActiveCell.FormulaR1C1 = "='[Pile Records.xlsx]278'!R[-210]C[-1]"
Range("C281").Select
ActiveCell.FormulaR1C1 = "='[Pile Records.xlsx]279'!R[-211]C[-1]"
Range("C6:C281").Select
Range("C281").Activate
Selection.Copy
Range("B6").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Range("D6:BP6").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
End Sub
Bookmarks