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.
9-Mar-17
ENOC SITE 1032 DUBAI UAE
ARE
95.01
8-Mar-17
SHARJAH CO-OP, HALWAN SHJ ARE
ARE
16.95
6-Mar-17
AL ZAJIL FAIRS MANAGEM SHARJAH ARE
ARE
100.00
6-Mar-17
AL ZAJIL FAIRS MANAGEM SHARJAH ARE
ARE
90.00
6-Mar-17
ADNOC AL ASRAR ABU DHABI ARE
ARE
114.00
6-Mar-17
SHARJAH CO-OP, HALWAN SHJ ARE
ARE
73.55
6-Mar-17
AL SHAAB VILLAGE-AL ZA SHARJAH UAE
ARE
50.00
6-Mar-17
AL SHAAB VILLAGE-AL ZA SHARJAH UAE
ARE
40.00
6-Mar-17
AL SHAAB VILLAGE-AL ZA SHARJAH UAE
ARE
100.00
6-Mar-17
AL SHAAB VILLAGE-AL ZA SHARJAH UAE
ARE
55.00
5-Mar-17
AL MANAMA H/MARKET-BR DUBAI ARE
ARE
63.90
4-Mar-17
ENOC SITE 1036 DUBAI UAE
ARE
112.01
3-Mar-17
SHARJAH CO-OP, HALWAN SHJ ARE
ARE
100.80
2-Mar-17
GIFTS MARKETS GEN.TRAD SHARJAH ARE
ARE
49.50
1-Mar-17
SHARJAH CO-OP, HALWAN SHJ ARE
ARE
142.40

<tbody>
</tbody>


Thanks in advance for your support and efforts.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
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.
19-Mar-17ENOC SITE 1032 DUBAI UAEARE95.01
56-Mar-17ADNOC AL ASRAR ABU DHABI AREARE114
124-Mar-17ENOC SITE 1036 DUBAI UAEARE112.01
Petrol Station Expenses(ADNOC + ENOC)
321.02

<tbody>
</tbody><colgroup><col><col><col><col span="5"></colgroup>
 
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,215,700
Messages
6,126,301
Members
449,308
Latest member
VerifiedBleachersAttendee

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