Copy and Paste Rows Between a Recurring Value in Column to Worksheets

Torrehn

New Member
Joined
Dec 4, 2019
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hello,

I'm real new to VBA but I am actively trying to learn so I can automate some weekly tasks I have at a new job. Not money for classes so I am trying to do what I can to teach myself.

Currently, one of my tasks has a master workbook with detailed breakdowns of payment for multiple customers. I have to manually split this up into individual worksheets and with some workbooks having thousands of rows, this is taking me a few hours. Sheet1 (where all the data is kept together) column D has a recurring value of "Account" that shows up and indicates to me where I need to begin a new worksheet. Below this can be any number of invoices we are paying (not a static number of rows). There is also data that has to be copied in the columns to the right (extends out to column N) that contains things like invoice date, invoice due date, amount, etc.

In researching how to parse data based on a column, I can't find a macro that does what I need.

Can anyone help me with this task?

I am also not the best at explaining so please feel free to ask me to elaborate if I did not explain myself well enough.

Thank you,

Torrehn
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Keep this for furture reference when posting for assistance with macros:
1. If more than one workbook is involved, provide the names of the workbooks, otherwise you will need to modify any code provided, so that the code executes against the correct workbook.
2. If there is a need to open, save or SaveAs a workbook to a directory other than your default directory, you must provide the directory path.
3. Provide sheet names or index numbers which apply to your actual worksheets, otherwise you will need to modify any code provided so that the code executes against the correct worksheet.
4. When referring to ranges on sheets, specify which sheet of which workbook the range ranges apply to. Most responders on this site flunked the ESP course, so they have to be told which worksheets the ranges belong to.
5. Use the sheet names and range references specifically like Sheet1, Cell A2, and refrain from using non specific pronouns like 'It' and 'They' or vague references like 'The sheet' or 'The Workbook'.
6. Nobody can see your worksheet so your column or row headers are meaningless in most cases to the responder. Use Column letters (or numbers) and Row numbers to define the ranges where your data resides, eg. Cells(2, 6) or Range("F2") or just cell F2.
7. Excel data is based on a grid structure, Code uses that grid structure to search, find and manipulate data. Data headers can change and vary from user to user and sheet to sheet but the grid remains constant, so you should always describe your issues with respect to the grid.

While the OP does contain she and range references it is unclear where some of the data to be copied resides or where it is to be copied to. Read your post without looking at the worksheet and see if you could properly do the job from what is provided in the post.

It might take more words to convey your issue, but you will get better results in less time. You can also speed thins up by posting an image of your data or a mock up if the data is sensitive. You can download a free XL2BB app at this link.

You might also wan to use the Upload Image button at lower left.
 
Upvote 0

Forum statistics

Threads
1,214,793
Messages
6,121,614
Members
449,039
Latest member
Mbone Mathonsi

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