简体   繁体   中英

Multi-Line Excel to New Row Per Line

I have a large excel file, 5000 Rows Sample of it is upload here .

the file contains data about employees as following:

First Column: Employee Name
Second: Employee ID
Columns 3-7:  Experiences (Multiline Values)
3: Career Name
4: Rank
5: From
6: To
7: Reason For Leaving
Columns 8-13: Managerial Jobs
Columns 14-17: Education
Columns 18-26: Courses

Now each employee will have many multi line values for Experiences, Managerial Jobs, Education and Courses, in other words, he have many courses one at each line on the same row

Now what is needed is as following: Excel Macro (VBA):

  1. To Move every employee (Row) with the header to a new worksheet in this same workbook, and name the sheet with employee ID which is located in Column 2 (The Code of this is ready)

  2. For Each multi line value (Education For Example), it should add each line in a separate row

  3. If Possible Sort every multiline values by date, from older to newer. and thats it,

In the attached excel file, I've made the first employee, it is it possible to repeat this operation for about 5000 employees, if not, what database do you suggest to use, can Microsoft Access do it?

Yes , it is possible, Excel with VBA subs can handle all of it. MS Access can do it too but as far as my knowledge goes it cannot create the tables as sheets in your existing Excel file.

Whilst Excel can theoretically handle 5000 worksheets, I would not recommend creating such a workbook.

Even with only a couple of hundred sheets, Excel workbooks get incredibly unwieldy. Performance can be an issue but navigation is a far greater one! Only a few worksheets are displayed in the horizontal list at the bottom. It is possible, using VBA, to create menus to get to specific sheets faster; but still the system is far from perfect.

It certainly sounds like an Access database would be a much better option here.

I would suggest one table for employees (this would have ~5000 records) where each employee has a unique ID. 'Single line' fields such as Career Name and Rank could go in here too.

Then, you would have another table for each 'multiple line' field, making use of the foreign keys from the employees table.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM