pull & sum values across sheets based on headers

KalilMe

Active Member
Joined
Mar 5, 2021
Messages
343
Office Version
  1. 2016
Platform
  1. Windows
hi

I would sum values for columns SALE,RET for sheets FRU,FES ,FN,SS and put the values in sheet COLLECTION into columns SALE,RET . the matching data in sheets FRU,FES ,FN,SS depend on column B should match with column B,C,D i in sheet COLLECTION .If they are matched then pull values and merge & sum the duplicate items across multiple sheets . with ignore unmatched items .
I have data almost 1400 rows across sheets .
COLLECTION (1).xlsm
ABCD
1ITEMBRSALERET
21VEG TOMATO SS12-
32VEG TOMATO AA1212
43FR BANANA TT20010
54FR APPLE LL10020
65FR PEAR NN10-
76FR BANANA QQ20-
FRU


COLLECTION (1).xlsm
ABCD
1ITEMBRSALERET
21VEG TOMATO SS20-
32VEG TOMATO AA2212
43FR BANANA TT1210
54FR APPLE LL122
65FR BANANA QQ12-
FEG


COLLECTION (1).xlsm
ABC
1ITEMBRSALE
21FR BANANA QQ10
32VEG TOMATO AA20
43FR BANANA TT40
54FR APPLE LL50
65FR PEAR NN5
FN



COLLECTION (1).xlsm
ABC
1ITEMBRRET
21FR BANANA TT5
32FR APPLE LL2
43FR PEAR NN3
SS



the result should just be in columns E,F
COLLECTION (1).xlsm
ABCDEFG
1ITEMBRTYORSALERETBALANCE
21FRBANANATT25225227
32FRAPPLELL16242120
43FRPEARNN15312
54FRBANANAQQ4242
65VEGTOMATOSS2020
76VEGTOMATOAA421230
87VEGONIONAA1-
98VEGONIONAA2-
109VEGONIONAA3-
COLLECTION
Cell Formulas
RangeFormula
G2:G10G2=E2-F2
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Why does item 5 on your results sum to 20? Anyway maybe something like:

=SUMPRODUCT(SUMIFS(INDIRECT({"FRU","FEG","FN"}&"!C:C"),INDIRECT({"FRU","FEG","FN"}&"!B:B"),B2&" "&C2&" "&D2))
 
Upvote 0
Why does item 5 on your results sum to 20?
sorry ! my bad
should be 32 .
as I said
I have data almost 1400 rows across sheets .
then should be by vba . I no know if you're able to achieve it by vba . even if you can't or nobody else provide me macro , then I will use your formula .
it works very well for column sale , but how mod for column RET ? becuase there is different loctation .
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,684
Members
449,116
Latest member
HypnoFant

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