Macro to trigger another Macro

pc732015

New Member
Joined
Oct 6, 2017
Messages
14
Hi, I have a Macro (Macro1) which is created using the Macro recorder. Macro1 is used to do similar functions in each worksheet. I can actually go to each worksheet and run Macro1 but I have altogether 500 worksheets, which means I have to do 500 times. I'm thinking of creating another Macro to run Macro1 automatically on the 500 worksheets but I'm a newbie and don't know how to cycle through all the 500 worksheets. Can someone help me? Thanks.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Can you post Macro1 so we can see what it is doing? We need to know if its selecting cells on the activesheet (typical of recorded macros) or doing anything else that requires the sheet it acts on to be active.
 
Upvote 0
Hi JoeMo,

I have attached 5 sample worksheets below. Pls let me know if it's possible to create a Macro to run Macro1 automatically on the 500 worksheets. Thanks.




This is Worksheet EquipmentA

[TABLE="class: grid"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]EquipmentA[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area9[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]EquipmentA[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area11[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]EquipmentA[/TD]
[TD="align: center"]PartD[/TD]
[TD="align: center"]Area9[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]EquipmentA[/TD]
[TD="align: center"]PartF[/TD]
[TD="align: center"]Area11[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: center"]EquipmentA[/TD]
[TD="align: center"]PartB[/TD]
[TD="align: center"]Area7[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: center"]EquipmentA[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area2[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD="align: center"]EquipmentA[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area8[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD="align: center"]EquipmentA[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area10[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD="align: center"]EquipmentA[/TD]
[TD="align: center"]PartB[/TD]
[TD="align: center"]Area6[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"]11[/TD]
[TD="align: center"]EquipmentA[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area1[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]12[/TD]
[TD="align: center"]EquipmentA[/TD]
[TD="align: center"]PartC[/TD]
[TD="align: center"]Area2[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]13[/TD]
[TD="align: center"]EquipmentA[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area7[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]14[/TD]
[TD="align: center"]EquipmentA[/TD]
[TD="align: center"]PartD[/TD]
[TD="align: center"]Area11[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]15[/TD]
[TD="align: center"]EquipmentA[/TD]
[TD="align: center"]PartG[/TD]
[TD="align: center"]Area9[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]16[/TD]
[TD="align: center"]EquipmentA[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area8[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]17[/TD]
[TD="align: center"]EquipmentA[/TD]
[TD="align: center"]PartB[/TD]
[TD="align: center"]Area6[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"]18[/TD]
[TD="align: center"]EquipmentA[/TD]
[TD="align: center"]PartK[/TD]
[TD="align: center"]Area10[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]19[/TD]
[TD="align: center"]EquipmentA[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area10[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]20[/TD]
[TD="align: center"]EquipmentA[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area8[/TD]
[TD="align: center"]2[/TD]
[/TR]
</tbody>[/TABLE]



This is Worksheet EquipmentB
[TABLE="class: grid"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]EquipmentB[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area9[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]EquipmentB[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area8[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]EquipmentB[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area11[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]EquipmentB[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area10[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: center"]EquipmentB[/TD]
[TD="align: center"]PartD[/TD]
[TD="align: center"]Area9[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: center"]EquipmentB[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area8[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD="align: center"]EquipmentB[/TD]
[TD="align: center"]PartF[/TD]
[TD="align: center"]Area11[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD="align: center"]EquipmentB[/TD]
[TD="align: center"]PartB[/TD]
[TD="align: center"]Area6[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD="align: center"]EquipmentB[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area2[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]11[/TD]
[TD="align: center"]EquipmentB[/TD]
[TD="align: center"]PartG[/TD]
[TD="align: center"]Area9[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]12[/TD]
[TD="align: center"]EquipmentB[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area8[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]13[/TD]
[TD="align: center"]EquipmentB[/TD]
[TD="align: center"]PartD[/TD]
[TD="align: center"]Area11[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]14[/TD]
[TD="align: center"]EquipmentB[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area10[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"]15[/TD]
[TD="align: center"]EquipmentB[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area7[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]16[/TD]
[TD="align: center"]EquipmentB[/TD]
[TD="align: center"]PartB[/TD]
[TD="align: center"]Area6[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"]17[/TD]
[TD="align: center"]EquipmentB[/TD]
[TD="align: center"]PartC[/TD]
[TD="align: center"]Area2[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]18[/TD]
[TD="align: center"]EquipmentB[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area1[/TD]
[TD="align: center"]1[/TD]
[/TR]
</tbody>[/TABLE]




This is Worksheet EquipmentC
[TABLE="class: grid"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]EquipmentC[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area1[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]EquipmentC[/TD]
[TD="align: center"]PartB[/TD]
[TD="align: center"]Area6[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]EquipmentC[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area10[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]EquipmentC[/TD]
[TD="align: center"]PartD[/TD]
[TD="align: center"]Area11[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: center"]EquipmentC[/TD]
[TD="align: center"]PartG[/TD]
[TD="align: center"]Area9[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: center"]EquipmentC[/TD]
[TD="align: center"]PartB[/TD]
[TD="align: center"]Area6[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD="align: center"]EquipmentC[/TD]
[TD="align: center"]PartB[/TD]
[TD="align: center"]Area7[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD="align: center"]EquipmentC[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area8[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD="align: center"]EquipmentC[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area2[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]11[/TD]
[TD="align: center"]EquipmentC[/TD]
[TD="align: center"]PartK[/TD]
[TD="align: center"]Area10[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]12[/TD]
[TD="align: center"]EquipmentC[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area8[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]13[/TD]
[TD="align: center"]EquipmentC[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area11[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]14[/TD]
[TD="align: center"]EquipmentC[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area9[/TD]
[TD="align: center"]1[/TD]
[/TR]
</tbody>[/TABLE]



This is Worksheet EquipmentD
[TABLE="class: grid"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]EquipmentD[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area1[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]EquipmentD[/TD]
[TD="align: center"]PartB[/TD]
[TD="align: center"]Area6[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]EquipmentD[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area10[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]EquipmentD[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area8[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: center"]EquipmentD[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area2[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: center"]EquipmentD[/TD]
[TD="align: center"]PartB[/TD]
[TD="align: center"]Area7[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD="align: center"]EquipmentD[/TD]
[TD="align: center"]PartF[/TD]
[TD="align: center"]Area11[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD="align: center"]EquipmentD[/TD]
[TD="align: center"]PartD[/TD]
[TD="align: center"]Area9[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD="align: center"]EquipmentD[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area11[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]11[/TD]
[TD="align: center"]EquipmentD[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area7[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]12[/TD]
[TD="align: center"]EquipmentD[/TD]
[TD="align: center"]PartD[/TD]
[TD="align: center"]Area11[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]13[/TD]
[TD="align: center"]EquipmentD[/TD]
[TD="align: center"]PartG[/TD]
[TD="align: center"]Area9[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]14[/TD]
[TD="align: center"]EquipmentD[/TD]
[TD="align: center"]PartB[/TD]
[TD="align: center"]Area6[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"]15[/TD]
[TD="align: center"]EquipmentD[/TD]
[TD="align: center"]PartK[/TD]
[TD="align: center"]Area10[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]16[/TD]
[TD="align: center"]EquipmentD[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area8[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]17[/TD]
[TD="align: center"]EquipmentD[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area10[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]18[/TD]
[TD="align: center"]EquipmentD[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area8[/TD]
[TD="align: center"]2[/TD]
[/TR]
</tbody>[/TABLE]



This is Worksheet EquipmentE
[TABLE="class: grid"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]EquipmentE[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area9[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]EquipmentE[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area11[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]EquipmentE[/TD]
[TD="align: center"]PartD[/TD]
[TD="align: center"]Area9[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]EquipmentE[/TD]
[TD="align: center"]PartF[/TD]
[TD="align: center"]Area11[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: center"]EquipmentE[/TD]
[TD="align: center"]PartB[/TD]
[TD="align: center"]Area7[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: center"]EquipmentE[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area2[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD="align: center"]EquipmentE[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area8[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD="align: center"]EquipmentE[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area10[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD="align: center"]EquipmentE[/TD]
[TD="align: center"]PartB[/TD]
[TD="align: center"]Area6[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"]11[/TD]
[TD="align: center"]EquipmentE[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area1[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]12[/TD]
[TD="align: center"]EquipmentE[/TD]
[TD="align: center"]PartC[/TD]
[TD="align: center"]Area2[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]13[/TD]
[TD="align: center"]EquipmentE[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area7[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]14[/TD]
[TD="align: center"]EquipmentE[/TD]
[TD="align: center"]PartK[/TD]
[TD="align: center"]Area10[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]15[/TD]
[TD="align: center"]EquipmentE[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area10[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]16[/TD]
[TD="align: center"]EquipmentE[/TD]
[TD="align: center"]PartA[/TD]
[TD="align: center"]Area8[/TD]
[TD="align: center"]2[/TD]
[/TR]
</tbody>[/TABLE]



This is Macro1
Sub Macro1()
'
' Macro1 Macro
'


'
Range("A1").Select
ActiveCell.FormulaR1C1 = "Equipment No."
Range("B1").Select
ActiveCell.FormulaR1C1 = "Part No."
Range("C1").Select
ActiveCell.FormulaR1C1 = "Area where Part is used"
Range("D1").Select
ActiveCell.FormulaR1C1 = "Qty"
Selection.End(xlToLeft).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Application.Goto Reference:="R100C1"
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWindow.SmallScroll Down:=12
Application.CutCopyMode = False
ActiveWorkbook.Worksheets("EquipmentA").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("EquipmentA").Sort.SortFields.Add Key:=Range( _
"B101:B119"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("EquipmentA").Sort
.SetRange Range("A100:D119")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
ActiveWindow.SmallScroll Down:=6
Range("B100").Select
Selection.AutoFilter
ActiveSheet.Range("$A$100:$D$119").AutoFilter Field:=2, Criteria1:="PartA"
Range("A100").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Application.Goto Reference:="R200C1"
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWindow.SmallScroll Down:=12
End Sub​
 
Upvote 0
Firstly, what is Macro1 supposed to do?
Row 1 initially is empty but Column A-D are assigned Column Headers.

Now at row 100 I see those same headers atop Pivot tables.

Going down to row 200 I see a copy of the range A1:D10, no pivot.

Secondly, I note that the data in the other 4 sheets is different to the first. How would you anticipate that Macro1 would work with them?

Thirdly, with those two issues clarified, how would you hope to identify 500 sheets? Might it be something like "Equip 001", "Equip 002", "Equip 003", ... "Equip 500"?
 
Upvote 0
Hi Brian,

Macro1 is to allow me to see which Area of the Equipment where PartA is been used most. Pls note that the sample data that I've given here is just a portion of the actual usage. If there are a few worksheets only (each worksheet represent an Equipment), I can click on each worksheet respectively and run Macro1. But due to there are 500 worksheets, it will take me a long time to go to individual worksheet to run Macro1, so that's why I'm asking here whether if there's any possibility creating a Macro to help me. Thanks.
 
Upvote 0
Why can you not just post your Macro code here in the forum. We should not be asked to download your code from a link you have provided. Links can always be dangerous.
 
Upvote 0
Hi Brian,

Macro1 is to allow me to see which Area of the Equipment where PartA is been used most. Pls note that the sample data that I've given here is just a portion of the actual usage. If there are a few worksheets only (each worksheet represent an Equipment), I can click on each worksheet respectively and run Macro1. But due to there are 500 worksheets, it will take me a long time to go to individual worksheet to run Macro1, so that's why I'm asking here whether if there's any possibility creating a Macro to help me. Thanks.
Fine.
It is possible to run a macro across your 500 sheets (if excel allows that creation). My main consideration was about how those sheets might be named, thus my naming of "Equip 001", etc. Are you happy that Macro1 as it stands meets your requirements? If so, provide a consistent means to name your sheets; if alphabetic I guess the progress is "..z", "..aa", "..ab", etc.
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,194
Members
453,021
Latest member
pingpong7117

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top