Data Consolidation in the same sheet.

JrExceler

New Member
Joined
Nov 18, 2016
Messages
17
I have been struggling with this task for a long time, and I still cannot find a solution, maybe it's very simple but I cannot find it :(
I would like to summarize- my data in the same sheet (or another if it's not possible) when I Have 3 different conditions (country, City and Sales Person) and need to create only one line when the 3 conditions are met per unique combination (like sumifs I did below).

The table might have different length and not always the same country city or sales person, the target is to get the unique values and the sum of the sales per month

Your support or guidance will be highly appreciated.

1708974075881.png
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
what version of excel do you have

will the columns always be the same
then

say in A13
=unique(A3:C9)

will give the first 3 columns
and then a SUMIFS()

=SUMIFS(D$2:D$9 , $A$2:$A$9, $A13 ,$B$2:$B$9, $B13 ,$C$2:$C$9, $C13 )
should be able to copy across and down

BUT that assumes all the columns match up
can be done in a different sheet

otherwise a SUMproduct()

Jan. Feb - is that just Text or is it a date formatted to just show the month
 
Last edited:
Upvote 0
Thank you for yor answer etaf, my columns are always the same but my rows will change, Jan Feb... is only the title of each month Text Format. Can this be done with a Macro? to have a button that creates the new excel sheet based on the original data provided by an external system?
 
Upvote 0
sorry , I dont provide VBA solutions

FYI - i have made up a sheet and copied into XL2BB just for completeness

Cell Formulas
RangeFormula
F3:F9F3=E3*10
G3:O9G3=F3*2
A12:C14A12=UNIQUE(A3:C9)
D12:O14D12=SUMIFS(D$3:D$9,$A$3:$A$9,$A12,$B$3:$B$9,$B12,$C$3:$C$9,$C12)
Dynamic array formulas.
 
Upvote 0
Thank you for your support etaf, I can work with this solution and I think it can be implemented with BVA just getting the table range and pasting the formula in the new sheet with the given length. I will investigate how to do it I'm not so good at Excel but keep practicing.
 
Upvote 0
whats BVA
and as asked what version of Excel????

EDIT - oh, BVA is that VBA - yes it could be done I just do not provide solutions in VBA here
 
Upvote 0
would be worth adding that to the profile - makes a lot of difference to solutions as 365 has many functions that other versions do not have
hopefully a member with VBA will be along to answer
 
Upvote 0
Here is a Power Query Solution

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Grouped Rows" = Table.Group(Source, {"Column1", "Column2", "Column3"}, {{"Jan", each List.Sum([#"1/1/2024"]), type number}, {"Feb", each List.Sum([#"2/1/2024"]), type number}, {"Mar", each List.Sum([#"3/1/2024"]), type number}, {"Apr", each List.Sum([#"4/1/2024"]), type number}, {"May", each List.Sum([#"5/1/2024"]), type number}, {"Jun", each List.Sum([#"6/1/2024"]), type number}, {"Jul", each List.Sum([#"7/1/2024"]), type number}, {"Aug", each List.Sum([#"8/1/2024"]), type number}, {"Sep", each List.Sum([#"9/1/2024"]), type number}, {"Oct", each List.Sum([#"10/1/2024"]), type number}, {"Nov", each List.Sum([#"11/1/2024"]), type number}, {"Dec", each List.Sum([#"12/1/2024"]), type number}})
in
    #"Grouped Rows"
 
Upvote 0

Forum statistics

Threads
1,215,073
Messages
6,122,976
Members
449,095
Latest member
Mr Hughes

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