I'll start with saying i've spent 6+ hours trying to get OpenAI to give me a working solution but was unsuccessful.
I have data in excel between columns A to AD. Column K is a start date (includes time), and Column L is an end date (includes time). Columns M, N and O are durations. Consider it to be duration1, duration2, and duration3. The order here is important. The rest of the data is descriptive and not pertinent to the issue.
Ask: If data is 'clean' the difference between the end date and start date equals the sum of any values in columns M, N and O.
In order as I check to see if any of rows M, N or O are populated, when I notice M populated, i first have to update the end date (Column K cell value + duration in column M cell value). Then since column N is also populated. I need to insert a new row, where the start date for this new row will be the previous rows end date. Same thing since column O has data, then i'll insert another row and the previous rows end date will be the new start date, and the 2nd inserted rows end date will be that new start date + the duration in column O.
I've attached an example that likely explains this better. The green table below is my target result.VBARequest.xlsm
When looking at the durations, if lets say N doesn't have data, but M and O have data, then i'd only need a total of two rows (one existing row where the end date is updated, and one inserted row) where i update the start and end dates accordingly. For all inserted rows I need to ensure I copy along all the rest of the columns data between column A to J, and P to AD.
If data exists in only one column (either of M, N or O) then no new rows need to be added since the difference in start and end date would already equal the duration available. Further if in the inserted rows the durations not being used can be blanked out this would allow for every row to only have one duration in any of columns M, N or O which would equal the difference between end and start dates for that row.
Any direction / assistance or guidance as to whether this is possible aside from a series of manual copies and pastes - would be appreciated!
Thanks!!
Bookmarks