• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Macro for Individual Sum up of the Unique Entries

Satrangi

New Member
Hi Everybody,
I want a Macro as I have list of Payments to Individuals, I want to Indivdualize all entries and have to find a Subtotal of all Catagorized.
Attached is the sheet for the initial Information and in another tab there is a final result.
Thanks
 

Attachments

  • Bnk 2.xlsx
    10.4 KB · Views: 3
Why macro? This can be easily accomplished using PivotTable.

Alternately you can sort based on Name then date and use Outline tool in Data ribbon tab.

If you really need macro solution, use Macro Recorder when you create Outline and go from there.

See attached.
 

Attachments

  • Bnk 2.xlsx
    17 KB · Views: 2
@Satrangi

Welcome to Chandoo.org forums and thanks for posting your question.

You can achieve the result with a simple pivot table. These are more robust and easy to maintain than a macro. For example, in your case, just add a running number (1,2,3...) as an extra column and then define headings to columns (date, person, amount and ID). Now, insert a pivot table with Person, Date, ID as row labels and amount as value. Set up the pivot table in tabular format and enable "repeat row labels" option. Add sub-totals to person field. Finally hide the column containing ID and your output is ready.

See attached workbook.
 

Attachments

  • Bnk 2.xlsx
    15.4 KB · Views: 2
Back
Top