I'd like to write a function that, when called, moves the selected range to the right a distance determined by a user inputted number (a dialogue box prompted by the function), whilst ignoring certain columns (both from the selected range and the output range).
In this photo, I've attempted to illustrate two examples of how this function would operate. The 'Original' and 'Result' rows are intended to be the same row, so this function would theoretically rewrite values within the selected range and to the right of it.
The primary difference between this example screenshot and our actual, working spreadsheet is that the column header numbers (rather than being 1,2,3,4,5,6,7), are weekdays and weekends.
This function would not require reading a header value in a column, it could just read as col()+1, but I wanted to illustrate how the values would need to be offset by frozen/protected columns on the left (A:A).
This operation is similar to what project management programs would simulate when showing durations that ignore/skip weekends (such as sliding a duration on a gantt chart). I understand there are ways to reorganize this data that would make the function much easier to write (such as removing weekends from the spreadsheet), but unfortunately the spreadsheet that needs this function is a shared one, and thus my options for automating this tedious task are limited to this rather obtuse math problem that I have not been able to find a solution for thus far.