Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Edit Recorded Macro with allocating data

0

I have recorded macro for the data of 30000 lin items .

1. Selected data and created two sheets.

2. One sheet one type of data and another sheet another type of data.

3. Created pivot for the newly created sheets in 3rd sheet.

Now I should allocate this new sheet data by inserting a new colum with 6 names based on the line items each item. For example, if there are 30000 line items i should allocate this to 6 persons equally and refresh the pivot.

Could you please let me know what code should I insert in between theĀ  recorded macro from steps 1 to 3?

Answer
Discuss

Discussion

For the task you describe, a recorded macro needs to be "cleaned" first: RemoveĀ all instances of "Select", declare a Range object and assign all instances of "Selection" to that object. That will reduce the size of your code by about 70%.

After you make the remaining code run on your computer please post it here and ask the questions you need to ask to expand and improve it.
Variatus (rep: 4889) Feb 25, '20 at 4:01 am
Add to Discussion



Answer the Question

You must create an account to use the forum. Create an Account or Login