Not sure if this is what you're looking for but you can declare A, B, and C as String and use them in your code as shown below. If you want to use a list to fill the values of A, B, and C you could do it by replacing (for instance)"Yes" with something like "Activesheet.range("X14").value"
Sub combine()
Dim A As String
Dim B As String
Dim C As String
A = "Yes"
B = "No"
C = "Maybe"
'Macro-1:- Selects/deselects few items
'
'Example Code:-
ActiveSheet.PivotTables("PV-2").PivotFields("Brand").CurrentPage = "(All)"
With ActiveSheet.PivotTables("PV-2").PivotFields("Brand")
.PivotItems(A).Visible = False
.PivotItems(B).Visible = False
.PivotItems(C).Visible = False
End With
'Macro-2: Highlights the same items
'Example Code:- (For A only)
'Cells.Find(What:=A, After:=ActiveCell, LookIn:= _
'xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
'xlNext, MatchCase:=True, SearchFormat:=False).Activate
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 6662349
.TintAndShade = 0
.PatternTintAndShade = 0
End With
'Macro-3: Enters this items in to a cell
'
'Example Code:-
Range("T2").Value = A
Range("T3").Value = B
Range("T4").Value = C
'Macro-4: Finds and paste values of this items
'
'Example Code:- (For A only)
Cells.Find(What:=A, After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=True, SearchFormat:=False).Activate
ActiveCell.Offset(0, 7).Select
Selection.Copy
Sheets("Slide-14").Select
Range("X6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'Macro-5 Deleting Entire row
'
'Example Code:- (For A only)
Cells.Find(What:=A, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.EntireRow.Select
Selection.Delete Shift:=xlUp
End Sub
Bookmarks