Hi!
First of all, a happy 2023 to everyone!
I wonder if some of you could cast some light on a problem I have:
The workspace is D9:W98 in a PROTECTED worksheet.
On rows 10, 13, 16, 19, 22 (...) 94, and 97 -each 3 rows- I have a sequence of VLOOKUP formulas on D:W wich require horizontal continuity (meaning, the sequence on each row is
independent from other rows), that the user can override by absolute values. However, there is a chance that the user may need to reset to the original formulas on a given
row.
The original formulas are stored on D101:X101 and hidden from the user's view (black font and black background), and PROTECTED (user can't select these cells).
I need a macro that works this way:
1) Unprotect worksheet
2) Identify the row currently selected;
3) If the row selected is NOT one of those rows (10,13,16,19, etc, 94 and 97), the macro will stop with a message "Wrong row selected";
4) Copy the content of D101:X101 and paste it -FORMULAS ONLY- to the D cell of the selected row;
5) Protect worksheet
The PASTE must be -FORMULAS ONLY- , as the workspace is heavily implemented with conditional formatting (wich is essencial for the workspace to be fully functional), and also
because I do not want to paste the black background of the original formulas to the destination row.
Best regards everyone!
V.
First of all, a happy 2023 to everyone!
I wonder if some of you could cast some light on a problem I have:
The workspace is D9:W98 in a PROTECTED worksheet.
On rows 10, 13, 16, 19, 22 (...) 94, and 97 -each 3 rows- I have a sequence of VLOOKUP formulas on D:W wich require horizontal continuity (meaning, the sequence on each row is
independent from other rows), that the user can override by absolute values. However, there is a chance that the user may need to reset to the original formulas on a given
row.
The original formulas are stored on D101:X101 and hidden from the user's view (black font and black background), and PROTECTED (user can't select these cells).
I need a macro that works this way:
1) Unprotect worksheet
2) Identify the row currently selected;
3) If the row selected is NOT one of those rows (10,13,16,19, etc, 94 and 97), the macro will stop with a message "Wrong row selected";
4) Copy the content of D101:X101 and paste it -FORMULAS ONLY- to the D cell of the selected row;
5) Protect worksheet
The PASTE must be -FORMULAS ONLY- , as the workspace is heavily implemented with conditional formatting (wich is essencial for the workspace to be fully functional), and also
because I do not want to paste the black background of the original formulas to the destination row.
Best regards everyone!
V.