Grouping with different name

Joined
Nov 7, 2017
Messages
7
Hi im in trouble,
[TABLE="class: cms_table, width: 128"]
<tbody>[TR]
[TD="class: cms_table_xl63, width: 64"]Name[/TD]
[TD="class: cms_table_xl64, width: 64"]Total[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl65"]Adsmi[/TD]
[TD="class: cms_table_xl66, align: right"]1[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl65"]Adsjj[/TD]
[TD="class: cms_table_xl66, align: right"]2[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl65"]Adshh[/TD]
[TD="class: cms_table_xl66, align: right"]3[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl65"]Mahh[/TD]
[TD="class: cms_table_xl66, align: right"]4[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl65"]Makk[/TD]
[TD="class: cms_table_xl66, align: right"]57[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl65"]Maiis[/TD]
[TD="class: cms_table_xl66, align: right"]9[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl65"]you[/TD]
[TD="class: cms_table_xl66, align: right"]900[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl65"]Yopp[/TD]
[TD="class: cms_table_xl66, align: right"]6[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl67"]Yodd[/TD]
[TD="class: cms_table_xl68, align: right"]42[/TD]
[/TR]
</tbody>[/TABLE]


Hi all, i need to sum up all the amount for the same name in front.
For example, first three row same name in front which is "ads****" which total will be 6.
and for name with "ma***" infront will be 70 and "Yo***" will be 948.
How can i do?
Help me......
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
I assumed your data is in a table called "tblNames"

I applied this query

Code:
SELECT Left([Name],2) AS X, Sum(tblNames.Total) AS SumOfTotal
FROM tblNames
GROUP BY Left([Name],2);
 
Upvote 0
Create a query. This is the SQL for the Query. If you are not familiar with Queries in Access then, perhaps you need to read this.

http://office.tizag.com/accessTutorial/accessqueries.php

What I gave you is the SQL equivalent of what you would build manually in the QBE.

SQL is the acronym for Structured Query Language which is the basis of how to get data out of Relational Data Base Management Systems (another acronym--RDBMS)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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