troubleshooting Question

split worksheet into new worksheets based on changing value in Column A (by means of an Excel VBA)

Avatar of Andreas Hermle
Andreas HermleFlag for Germany asked on
Microsoft OfficeCMicrosoft ExcelVBA
4 Comments2 Solutions247 ViewsLast Modified:
Dear Experts:

on the current worksheet I would like to split the current worksheet named 'DataSource' into several worksheets based on the value in Column A,
... ie. whenever the Value in Column A changes, all the rows that belong to this value are to be copied into a new worksheet with the respective value as worksheet name:


Basis (Worksheet named DataSource):
Column A     column B        Column C         Column D
EN-23          House                   New               370 Dollars
EN-23          House                   old                  450 Dollars
EN-23          Apartment           new                380 Dollars
EN-45          House                  old                    220 Dollars
EN-45          House                  new                    93 Dollars
EN-17          HOuse                  old                     84 Dollars
EN-17           HOuse                 new                  30 Dollars


After running the macro:

new worksheet named EN-23 is created with the following contents:
Column A     column B        Column C         Column D
EN-23          House                   New               370 Dollars
EN-23          House                   old                  450 Dollars
EN-23          Apartment           new                380 Dollars


new worksheet named EN-45 is created with the following contents
EN-45          House                  old                    220 Dollars
EN-45          House                  new                    93 Dollars

new worksheet named EN-17 is created with the following contents
EN-17          HOuse                  old                     84 Dollars
EN-17           HOuse                 new                  30 Dollars


Help is very much appreciated. I have attached a sample file for your convenience.

Thank you very much in advance

Regards, Andreas
Split_Worksheet_based_ColumnA.xlsx
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 2 Answers and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros