Create a new sheet in a separate workbook for each group of matching numbers/values

ubergreen

New Member
Joined
Jun 13, 2024
Messages
33
Office Version
  1. 2021
I am not sure if this is something that is even possible with excel, but I figure I'll ask and see if those who are more familiar with it might know better than me.

All of my orders are downloaded as a single csv file into a workbook called Orders.

I need to transfer each of those orders to another workbook called Forms that has additional references from other workbooks and calculations, etc, and then save it as a PDF.

I was wondering if it would be possible to create a VBA code that would be able to recognize each group of matching order #s, create a new sheet for each group on my Forms workbook and then fill in the information for the order accordingly.

The way that I currently handle it is I have my Forms workbook set up to reference the rows in my Orders workbook. It only references the following rows that have a matching order number that is in the top row. I then save the Forms worksheet as a PDF and manually delete the rows for that order so that the next order group is moved up.

Example below. Workbook on the right side is Orders and workbook on the left is Forms.

1.jpg


2.jpg


3.jpg


4.jpg


5.jpg
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

Forum statistics

Threads
1,224,811
Messages
6,181,082
Members
453,021
Latest member
Justyna P

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