To sum based on the condition

xlhelp15

Board Regular
Joined
Sep 12, 2014
Messages
116
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
  3. Web
Hello All,

Kindly help me for the below query which I need in the way of Excel-VBA.

Here column A - is the serial number and I need to sum the values of Column C (56+44.01+33.20 = 133.21) and provide the value in Column D in row 1. Likewise, it needs to sum automatically for the Serial numbers - 2, 3, 4, 5 and so on.

Your help is greatly appreciated !
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]1234
[/TD]
[TD]56.00
[/TD]
[TD]133.21
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]44.01
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]33.20
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]4567
[/TD]
[TD]33.35
[/TD]
[TD]78.20
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]44.85
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,171
Members
453,021
Latest member
Justyna P

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