franklin_m
New Member
- Joined
- Jun 16, 2013
- Messages
- 47
- Office Version
- 365
- Platform
- Windows
- MacOS
This one is kicking my bu**.
The data source comes from someone using a worksheet like a piece of paper, and I'm trying to turn it into some useable data. It's a schedule for a year set up like a Gantt chart. Row A, columns 5 through 370 are the day of the year. Column A, rows 1-200 are the individual's name. Columns B, C, & D contain admin data for each name. Columns 5 (E) through 370 contain either an empty cell ( "" ) or an "X" depending on whether that person is scheduled to work that day. There's no regularity in the duration of the work shift (in days).
What I want to do is for each row (name) on the schedule worksheet, loop through the cells looking for the pattern of empty cell followed by "X", then read that day of the year from row "A" and the column where the "X" appears - and write that date to another worksheet (say "Table_Data")where the name of individual is in column "A", the date read from the loop in column "B." Then back on the original data sheet, continue from that date looking now for the pattern of "X" followed by an empty cell ( "" ), where the "X" marks the last day of the shift. Then like above, read that column date and write on that other worksheet in column "C". It would continue looping through the rest of the days in the year and create a new line on the "Table_Data" worksheet for each start end date throughout the year. Once it's searched all 365 days, then move to the next line on the schedule sheet and do the same.
Thanks so much ...
Frank
The data source comes from someone using a worksheet like a piece of paper, and I'm trying to turn it into some useable data. It's a schedule for a year set up like a Gantt chart. Row A, columns 5 through 370 are the day of the year. Column A, rows 1-200 are the individual's name. Columns B, C, & D contain admin data for each name. Columns 5 (E) through 370 contain either an empty cell ( "" ) or an "X" depending on whether that person is scheduled to work that day. There's no regularity in the duration of the work shift (in days).
What I want to do is for each row (name) on the schedule worksheet, loop through the cells looking for the pattern of empty cell followed by "X", then read that day of the year from row "A" and the column where the "X" appears - and write that date to another worksheet (say "Table_Data")where the name of individual is in column "A", the date read from the loop in column "B." Then back on the original data sheet, continue from that date looking now for the pattern of "X" followed by an empty cell ( "" ), where the "X" marks the last day of the shift. Then like above, read that column date and write on that other worksheet in column "C". It would continue looping through the rest of the days in the year and create a new line on the "Table_Data" worksheet for each start end date throughout the year. Once it's searched all 365 days, then move to the next line on the schedule sheet and do the same.
Thanks so much ...
Frank