Hi, I am new to writing VBA and need some help solving a particular problem.
Firstly, my advance apologies if this has been covered in a previous string - my search didn't bring up what I was looking for.
I have attached my sample dataset, basically it is one sheet with two fields. The first field is the group in this case being department type. The second field is a series of numbers - a series of employee id numbers for each of the different departments.
Departments and employees.xlsx
I need to split each department and respective list of employee numbers into individual sheets (can be the same workbook). Each sheet will be named according to the respective department name but will only contain the list of employee id numbers pertaining to that department without a title row. From there I need to export each sheet into a text file, the file name being the name of the worksheet (i.e. fruit type) and contents of the file being the list of serial numbers. The number of different departments could change each month so it needs to be flexible to allow for new departments and volume of employee id numbers per department.
I've found a piece of code to split the data - it can kind of do what I need but keeps the group field and title rows in the individual sheets, unfortunately I cannot understand the code well enough to remove the titles and group fields.
Any help would be most gratefully received.
Thanks in advance
Jamie
Bookmarks