How do I use Excel Macros to Copy data to a new tab?

January 9, 2017 at 17:20:42
Specs: Windows 7
Hello,

Using a few of the threads here I have figured out how to copy my information to the appropriate sheets, but I would like to take it one step further. If anyone would be able to help or guide me to the correct thread, it would be very appreciated.

I have a data dump used to calculate commissions. The data dump is sorted by Territory (Column M). The first row is a header row, I have managed to create the "SortTemp" sheet and sort by the column M, (Territory) and move the data to the appropriate sheets, but I don't know how to sum Column 1. This Column can be 1 row or hundreds of rows.

My end goal is:
1. Create the SortTemp sheet (Completed)
2. Sort by Column M (Territory) (Completed)
3. Create a new Sheet in the same workbook with the Headers from the SortTemp. (Complete)
4. Copy all of the rows to the appropriate sheet. (Complete)
5. Sum Column I on each sheet
6. Two cells below the sum multiply the sum by .05
7. Two Cells to the left of that value write "Commission Payable"

Any assistance or guidance to the proper thread would be very appreciated.

Thanks and Happy New Year!!!

message edited by FCase


See More: How do I use Excel Macros to Copy data to a new tab?

Reply ↓  Report •


#1
January 9, 2017 at 18:12:26
I'm confused. Your subject line asks how to use a macro to copy data to a new tab, but the body of your post seems to be asking about summing and multiplying data.

Why the discrepancy?

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Reply ↓  Report •

#2
January 9, 2017 at 18:43:04
Yes, Sorry about that. I had originally wrote asking for assistance with the first few steps, but worked through that roadblock. I edited my original posting, but I didn't see how to edit the subject header.
I actually edited code that you had wrote a few years ago doing a similar process with Month and Year.

Would you be able to provide some assistance please?

message edited by FCase


Reply ↓  Report •

#3
January 10, 2017 at 03:44:57
Since I can't see your workbook from where I am sitting, I don't know what your data looks like. It's hard to write code without knowing what I am working with.

Can I assume that each sheet has a different amount if data in Column I and that one of your issues is that you don't know how to determine where to put the formulas?

Can I also assume that you don't know how to write the VBA to construct the formulas and then place them in the appropriate cells?

Is there anything else that you think I need to know?

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Reply ↓  Report •

Related Solutions


Ask Question