Hi All
I have my macro working essentially how I would like it to. However, as an added convenience for myself and other potential users down the road (this is a work in progress, as I am relatively new to excel) I would like my existing macro to also take in to account multiple projects. Basically the macro as it stands filters for unique values and then adds these values up on another sheet. I would like however, for these values to be multiplied by the of consoles that need to be made.
On sheet 1 I have a tile set up where I can enter the number of consoles to be made. I would like the totals on sheet 2 to be multiplied by that number. I have tried to do this with VBA but my skills are unforunately lacking.
The Cell I would like to be variable is L10 on sheet 1. I would like the count columns on sheet 2 to be automatically multiplied by the number in L10 in the macro. Here is my code:
Sub CONSOL()
'
' CONSOL Macro
'
' Keyboard Shortcut: Ctrl+Shift+I
Application.ScreenUpdating = False
Range("B5").Select
Columns("B:B").AdvancedFilter Action:=xlFilterInPlace, Unique:=True
Range("B:B,C:C").Select
Range("C1").Activate
Selection.Copy
Sheets("Sheet2").Select
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Sheet1").Select
Application.CutCopyMode = False
Columns("B:B").AdvancedFilter Action:=xlFilterInPlace, Unique:=False
Columns("D:D").Select
Columns("D:D").AdvancedFilter Action:=xlFilterInPlace, Unique:=True
Range("D:D,E:E").Select
Range("E1").Activate
Selection.Copy
Sheets("Sheet2").Select
Range("C2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Sheet1").Select
Application.CutCopyMode = False
Columns("D:D").AdvancedFilter Action:=xlFilterInPlace, Unique:=False
Columns("F:F").Select
Columns("F:F").AdvancedFilter Action:=xlFilterInPlace, Unique:=True
Range("F:F,G:G").Select
Range("G1").Activate
Selection.Copy
Sheets("Sheet2").Select
Range("E2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Sheet1").Select
Application.CutCopyMode = False
Columns("F:F").AdvancedFilter Action:=xlFilterInPlace, Unique:=False
Columns("H:H").Select
Columns("H:H").AdvancedFilter Action:=xlFilterInPlace, Unique:=True
Range("H:H,I:I").Select
Range("I1").Activate
Selection.Copy
Sheets("Sheet2").Select
Range("G2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Sheet1").Select
Application.CutCopyMode = False
Columns("H:H").AdvancedFilter Action:=xlFilterInPlace, Unique:=False
Range("J3,K3").Select
Range("K3").Activate
Selection.Copy
Sheets("Sheet2").Select
Range("I4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Sheet1").Select
Application.CutCopyMode = False
Sheets("Sheet2").Select
Application.ScreenUpdating = True
End Sub
Thanks so much
Bookmarks