Link to home
Start Free TrialLog in
Avatar of vsuripeddi
vsuripeddi

asked on

Split Excel Data into Multiple Excel Sheets

I am using Excel 2007. I have Employee Data in a Excel Workbook called Employee.xls.
All the data is in a worksheet called Data. It has columns like Employee name,Dept number, Salary, Comission. All the data is sorted by Employee name.  The data contains multiple records of different employees. For example there would be 10 records of Chris Smith, 20 records of Edward Martin, 30 records of John Holt... etc.

I need to parse through the entire Data worksheet and every time there is a change in the Employee name,  I need to create a new worksheet and put the entire data of that employee in the new sheet. For example Chris Smith would have a new sheet with his data of name , Dept, salary and comission.. Simiilary Edward MArtin and John Holt would have their own worksheet tabs with their own respective information.

Could some one please suggest an Excel VBA code as to how achieve this?

Thanks
Avatar of vsuripeddi
vsuripeddi

ASKER

Please provide Excel VBA Code or macros
Avatar of Rob Henson
Before you start, how many employees do you have data for? Obviously more than just a few or else it wouldn't need a routine to accomplish the task.

Excel has a limit to how many sheets it can accommodate. It used to be 256 but I don't know if that has increased with newer versions.

Do you want to permanently separate the data into individual sheets or just for reporting purposes keeping the original intact?

Sounds like you could use the AutoFilter function. When you apply the filter and copy the cells, only the visible cells are copied so can be pasted into a separate sheet  as required. If the cells are not contiguous, all the Chris Smith rows for example are togther, the copied data will not include formulas, they will be converted to value. If they are contiguous the formulas will stay and will recalculate.

Do a search on EE for Filter copy routines and you will find some that have been used by other users recently.

Thanks
Rob H
Hi,

I think what you want to do is this:

1- use a form to pull up the list of employees from Data worksheet and select which you want to update
2- use another form to update employee information
3- on save, populate the information to a separate sheet

This could be easily done.

Thanks,
Girard Andrew
check this

Go to Macro run the Step1 Macro
Work.xlsm
ASKER CERTIFIED SOLUTION
Avatar of Patrick Matthews
Patrick Matthews
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ukerandi,

As a courtesy to you fellow Members, please always post the code you used in your comment.  By not posting the code you:

1) Force anyone wanting to see your solution to download a file and

2) Make your suggestion unsearchable for future users (and believe it or not, the vast majority of EE Members search the question database rather than ask new questions)

Thanks!

Patrick