I have one last "error" in my spreadsheet that I have no idea how to address. Quick explanation:
My spreadsheet creates a graphical schedule based on the name you select. Each cell counts as a 30-minute block of time, with the times rounding up to the nearest half hour for class start times, and rounding down for class end times (so if a class starts at 8:17, the time is rounded to 8:00. If it ends at 8:17, it rounds to 8:30). I have a loop that takes the class times (converted into integers) and merges a range of cells based on these values. The code is here:
It works *beautifully* in 95% of the cases, but I have one hiccup that I'm not sure how to address. Let's say you have two classes back-to-back, one that ends at 8:10 and the next class begins at 8:15. Based on rounding, that means the first class ends at 8:30 and the next class begins at 8:00, so they overlap. As a result, the cells for both classes end up being merged together so one of the classes goes away. Is there a way to make VBA check to see if a cell is merged , and if so, merge only the cells within the range that aren't already merged?Please Login or Register to view this content.
I could solve this by rounding everything up or down, but then the class contact hours would be incorrect. I just need to find some way to keep the overlapping classes from merging together if that's possible. Any input would be greatly appreciated!
Bookmarks