Selecting specific text and suming the results.

mozahra

New Member
Joined
Jun 9, 2017
Messages
6
Dear All,

Thanks in advance for your time to help me with my inquiry.

I have some expenses data where I want to select common or close text from a list and sum the amount spent for a specific month "Mar". Then I will work on creating a dashboard out of it.


Example of output required.

ENOC SITES : 140 ARE. [ Data below is having different Site numbers, but I want to group them all together]
SHARJAH CO-OP : 260 ARE.
[TABLE="width: 568"]
<tbody>[TR]
[TD]9-Mar-17
[/TD]
[TD]ENOC SITE 1032 DUBAI UAE
[/TD]
[TD]ARE
[/TD]
[TD]95.01
[/TD]
[/TR]
[TR]
[TD]8-Mar-17
[/TD]
[TD]SHARJAH CO-OP, HALWAN SHJ ARE
[/TD]
[TD]ARE
[/TD]
[TD]16.95
[/TD]
[/TR]
[TR]
[TD]6-Mar-17
[/TD]
[TD]AL ZAJIL FAIRS MANAGEM SHARJAH ARE
[/TD]
[TD]ARE
[/TD]
[TD]100.00
[/TD]
[/TR]
[TR]
[TD]6-Mar-17
[/TD]
[TD]AL ZAJIL FAIRS MANAGEM SHARJAH ARE
[/TD]
[TD]ARE
[/TD]
[TD]90.00
[/TD]
[/TR]
[TR]
[TD]6-Mar-17
[/TD]
[TD]ADNOC AL ASRAR ABU DHABI ARE
[/TD]
[TD]ARE
[/TD]
[TD]114.00
[/TD]
[/TR]
[TR]
[TD]6-Mar-17
[/TD]
[TD]SHARJAH CO-OP, HALWAN SHJ ARE
[/TD]
[TD]ARE
[/TD]
[TD]73.55
[/TD]
[/TR]
[TR]
[TD]6-Mar-17
[/TD]
[TD]AL SHAAB VILLAGE-AL ZA SHARJAH UAE
[/TD]
[TD]ARE
[/TD]
[TD]50.00
[/TD]
[/TR]
[TR]
[TD]6-Mar-17
[/TD]
[TD]AL SHAAB VILLAGE-AL ZA SHARJAH UAE
[/TD]
[TD]ARE
[/TD]
[TD]40.00
[/TD]
[/TR]
[TR]
[TD]6-Mar-17
[/TD]
[TD]AL SHAAB VILLAGE-AL ZA SHARJAH UAE
[/TD]
[TD]ARE
[/TD]
[TD]100.00
[/TD]
[/TR]
[TR]
[TD]6-Mar-17
[/TD]
[TD]AL SHAAB VILLAGE-AL ZA SHARJAH UAE
[/TD]
[TD]ARE
[/TD]
[TD]55.00
[/TD]
[/TR]
[TR]
[TD]5-Mar-17
[/TD]
[TD]AL MANAMA H/MARKET-BR DUBAI ARE
[/TD]
[TD]ARE
[/TD]
[TD]63.90
[/TD]
[/TR]
[TR]
[TD]4-Mar-17
[/TD]
[TD]ENOC SITE 1036 DUBAI UAE
[/TD]
[TD]ARE
[/TD]
[TD]112.01
[/TD]
[/TR]
[TR]
[TD]3-Mar-17
[/TD]
[TD]SHARJAH CO-OP, HALWAN SHJ ARE
[/TD]
[TD]ARE
[/TD]
[TD]100.80
[/TD]
[/TR]
[TR]
[TD]2-Mar-17
[/TD]
[TD]GIFTS MARKETS GEN.TRAD SHARJAH ARE
[/TD]
[TD]ARE
[/TD]
[TD]49.50
[/TD]
[/TR]
[TR]
[TD]1-Mar-17
[/TD]
[TD]SHARJAH CO-OP, HALWAN SHJ ARE
[/TD]
[TD]ARE
[/TD]
[TD]142.40
[/TD]
[/TR]
</tbody>[/TABLE]


Thanks in advance for your support and efforts.
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Thanks Joe4.

I want Excel to through the column that has the text and pick all text that are common, for instance ENOC / Sharjah / AL SHAAB and sum all the spent amount together. Means the output will be

ENOC SITES : 140 ARE
Sharjah : 2000 ARE.
AL ZAJIL : 350 ARE.

Thanks for your support and I hope am clear enough.
awaiting your kind response.

Regards
 
Upvote 0
ENOC SITES : 140 ARE
Sharjah : 2000 ARE.
AL ZAJIL : 350 ARE.

I'm not sure where these numbers are coming from. Is this what you are looking for?


Excel 2010
ABCDEFG
19-Mar-17ENOC SITE 1032 DUBAI UAEARE95.01ENOC SITE207.02
28-Mar-17SHARJAH CO-OP, HALWAN SHJ AREARE16.95Sharjah333.7
36-Mar-17AL ZAJIL FAIRS MANAGEM SHARJAH AREARE100AL ZAJIL190
46-Mar-17AL ZAJIL FAIRS MANAGEM SHARJAH AREARE90
56-Mar-17ADNOC AL ASRAR ABU DHABI AREARE114
66-Mar-17SHARJAH CO-OP, HALWAN SHJ AREARE73.55
76-Mar-17AL SHAAB VILLAGE-AL ZA SHARJAH UAEARE50
86-Mar-17AL SHAAB VILLAGE-AL ZA SHARJAH UAEARE40
96-Mar-17AL SHAAB VILLAGE-AL ZA SHARJAH UAEARE100
106-Mar-17AL SHAAB VILLAGE-AL ZA SHARJAH UAEARE55
115-Mar-17AL MANAMA H/MARKET-BR DUBAI AREARE63.9
124-Mar-17ENOC SITE 1036 DUBAI UAEARE112.01
133-Mar-17SHARJAH CO-OP, HALWAN SHJ AREARE100.8
142-Mar-17GIFTS MARKETS GEN.TRAD SHARJAH AREARE49.5
151-Mar-17SHARJAH CO-OP, HALWAN SHJ AREARE142.4
Sheet1
Cell Formulas
RangeFormula
G1=SUMIF(B:B,F1&"*",D:D)
 
Upvote 0
Thanks Dear,
As I motioned they are just examples. you got it right. If I want excel to consider either EONC / ADCO (Name of petrol stations) text. How would I do this as per your formula.
 
Upvote 0
Hi 63Falcondude,
My bad, its a typo, I mean ENOC/ ADNOC.

Are you looking for this?


Excel 2010
ABCDEFG
19-Mar-17ENOC SITE 1032 DUBAI UAEARE95.01ENOC207.02
28-Mar-17SHARJAH CO-OP, HALWAN SHJ AREARE16.95ADNOC114
36-Mar-17AL ZAJIL FAIRS MANAGEM SHARJAH AREARE100
46-Mar-17AL ZAJIL FAIRS MANAGEM SHARJAH AREARE90
56-Mar-17ADNOC AL ASRAR ABU DHABI AREARE114
66-Mar-17SHARJAH CO-OP, HALWAN SHJ AREARE73.55
76-Mar-17AL SHAAB VILLAGE-AL ZA SHARJAH UAEARE50
86-Mar-17AL SHAAB VILLAGE-AL ZA SHARJAH UAEARE40
96-Mar-17AL SHAAB VILLAGE-AL ZA SHARJAH UAEARE100
106-Mar-17AL SHAAB VILLAGE-AL ZA SHARJAH UAEARE55
115-Mar-17AL MANAMA H/MARKET-BR DUBAI AREARE63.9
124-Mar-17ENOC SITE 1036 DUBAI UAEARE112.01
133-Mar-17SHARJAH CO-OP, HALWAN SHJ AREARE100.8
142-Mar-17GIFTS MARKETS GEN.TRAD SHARJAH AREARE49.5
151-Mar-17SHARJAH CO-OP, HALWAN SHJ AREARE142.4
Sheet1
Cell Formulas
RangeFormula
G1=SUMIF(B:B,F1&"*",D:D)


If not, please show us an example of what it is that you are looking for using the data the you have already provided.
 
Upvote 0
Dear 63falcon,
Thanks once again for your support. I have filtered the data I have previously given to show more what I would like Excel to do for me. I would like Excel to get the sum of all ADNOC or ENOC petrol stations only from the given data.

Regards.
[TABLE="class: outer_border, width: 785"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]9-Mar-17[/TD]
[TD="align: left"]ENOC SITE 1032 DUBAI UAE[/TD]
[TD="align: left"]ARE[/TD]
[TD]95.01[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]6-Mar-17[/TD]
[TD="align: left"]ADNOC AL ASRAR ABU DHABI ARE[/TD]
[TD="align: left"]ARE[/TD]
[TD]114[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]4-Mar-17[/TD]
[TD="align: left"]ENOC SITE 1036 DUBAI UAE[/TD]
[TD="align: left"]ARE[/TD]
[TD]112.01[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Petrol Station Expenses(ADNOC + ENOC)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]321.02[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody><colgroup><col><col><col><col span="5"></colgroup>[/TABLE]
 
Upvote 0
Oh so you want to take the sum for ADNOC and ENOC. In that case, try this:

=SUM(SUMIF(B:B,{"ENOC*","ADNOC*"},D:D))
 
Upvote 0

Forum statistics

Threads
1,223,902
Messages
6,175,278
Members
452,629
Latest member
SahilPolekar

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