G
Guest
I have a spreadsheet that I used the following function to create a unique
list.
Rows("1:1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Sort Key1:=Range("I2"), Order1:=xlAscending, Key2:=Range("D2") _
, Order2:=xlAscending, Header:=xlYes, OrderCustom:=1,
MatchCase:=False _
, Orientation:=xlTopToBottom
' Count the number of used rows
Set A = Worksheets(1)
Set R = A.UsedRange.Cells
stRng = R.Rows.Count
Range("I2:I" & stRng).AdvancedFilter Action:=xlFilterCopy,
CopyToRange:=Range("G" & stRng + 4), Unique:=True
For each unique value I can have several rows that have amounts in them.
What I need to do is create a sum function based on the unique list. Can
this be down, and how?
TIA
list.
Rows("1:1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Sort Key1:=Range("I2"), Order1:=xlAscending, Key2:=Range("D2") _
, Order2:=xlAscending, Header:=xlYes, OrderCustom:=1,
MatchCase:=False _
, Orientation:=xlTopToBottom
' Count the number of used rows
Set A = Worksheets(1)
Set R = A.UsedRange.Cells
stRng = R.Rows.Count
Range("I2:I" & stRng).AdvancedFilter Action:=xlFilterCopy,
CopyToRange:=Range("G" & stRng + 4), Unique:=True
For each unique value I can have several rows that have amounts in them.
What I need to do is create a sum function based on the unique list. Can
this be down, and how?
TIA