Loop & Sum Subtotal VBA

Anilk

New Member
Joined
Feb 15, 2007
Messages
24
hi,
i have a set of numbers which run something like this
Excel Workbook
AB
4Amount 1Amount 2
5$2000
6$111
7$622
8$5000
9$200
10$4300
11$1800
12$600
13$2000
14$500
15$1200
16$2000
Sheet5
Excel 2007<br

My Amount count will go to thousands..., How can i write a macro so as it will shown the sum of Amount 2 with corresponding figures in Amount1, and a row inserted after every sub total (matched).......... say..... something like this...(while those unmatched can be sorted in any manner)
Excel Workbook
ABC
18Amount 1Amount 2
19$5000$200
20$4300
21$500
22Subtotal$5000$5000
23
24$1800$600
25$1200
26Subtotal$1800$1800
27
28$2000$2000
29Subtotal$2000$2000
30
31$622
32$111
Sheet5
Excel 2007

I will be greatly obliged, if u can provide some kind of help to this. Thanks in anticipation excel gurus. (I posted earlier but couldnt express me properly as i had not used HTML maker.. hence resubmitting with HTML)..please excuse my ignorance.

Cheers
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Similar threads

Forum statistics

Threads
1,224,581
Messages
6,179,668
Members
452,936
Latest member
anamikabhargaw

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