VBA code to sum up the values having same name

noopura112

Board Regular
Joined
May 9, 2014
Messages
73
Hello Friends,

Can anybody help me t owrite a VBA code for following:

I have 2 columns. In column A i have material numbers and in another column i have total net sales for those material numbers.
Some material numbers are occuring in column A twice or more than twice.

I want to consolidate all same material numbers in one row and make addition/sum of the values in column B
Material No
Total Net Sales
123
1000
456
2000
123
3000
456
4000
789
5000

<tbody>
</tbody>

Output should be:
Material No
Total Net Sales
123
4000
456
6000
789
5000

<tbody>
</tbody>

Thank you in advance
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Column A values i am taking from another sheet. So In this sheet i just applied remove duplicates and made a sum of values for same values in column A giving reference of another sheet
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,251
Members
448,556
Latest member
peterhess2002

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