sorting - Excel- Copy and sort a list dynamically: -
i trying condense list there no duplicates , updates automatically new info added. here simpler version of trying do: sheet 2: column a: column b: mint 1 chocolate 2 mint 1 chocolate 1 vanilla 5
the, on sheet 1 want summary say: column a: column b: mint 2 chocolate 3 vanilla 5
i able this, when totally new flavor added have not seen before , no way predict (say new monthly flavor), how can update automatically added summary page. in case old flavor added, continues add together appropriate column.
for example, add together on original sheet 2 looks following- column a: column b: mint 1 chocolate 2 mint 1 chocolate 1 vanilla 5 mint 4 chocolate 2 special 2 brownie 8
i know want summary sheet following: column a: column b: mint 6 chocolate 5 vanilla 5 special 2 brownie 8
sub dynamicsumnsort() sheets("sheet2").range("a:a").copy destination:= sheets("sheet1").range("a:a") sheets("sheet1").range("a:a").removeduplicates columns:=1, header:=xlno sheets("sheet1").select range("a1").select while activecell.value <> vbnullstring activecell.offset(0,1).formular1c1 ="=sumifs(sheet2!c,sheet2!c[-1],sheet1!rc[-1])" activecell.offset(1,0).select wend end sub
try size, allow me know if encounter issues edit: apologies, have corrected error
excel sorting
No comments:
Post a Comment