Airwalker
03-27-2008, 09:09 AM
Hi,
I'm working on a set of rather large sheets where we have products in column C, with 4 rows for each product (Base, Promo, Total Planned, Sales In).
'Base' and 'Promo' are user input rows, with formulas in 'Total Planned' and 'Sales In'. Each sheet can vary in length (some down to 300 or so rows, and others as far down to 5000+ rows!) depending on the number of products in each category.
The data is consistent in the sense that 'Base' is every 1st row, 'Promo' is every 2nd, 'Total Planned' is every 3rd, and 'Sales In' is every 4th.
What I would like to do (without having to protect each sheet, or go through and define each row) is to tell Excel that if the user goes in to edit either the 'Total Planned', or 'Sales In' rows, to prevent them from making any changes to these rows.
I saw something on here a while back in the knowledge base (found from an external link) where the code told Excel to protect every 3rd row, or column, or a defined range (the example sheet that was attached had all three as examples), but for the life of me I can't find it anywhere! Not even from the site I'm sure I found it through - I even remember saving the example file, but I can't even find that now!!
I've seen a few similar sets of code around here that protect a set range, or specific row, but they don't seem to allow for multiple sets of ranges (rows/columns).
Is there anyone that either knows the code I'm looking for and can direct me back to it, or someone that can show me how this would be done so that I can adjust the code for my own requirement?
Many thanks in advance.
Wai
I'm working on a set of rather large sheets where we have products in column C, with 4 rows for each product (Base, Promo, Total Planned, Sales In).
'Base' and 'Promo' are user input rows, with formulas in 'Total Planned' and 'Sales In'. Each sheet can vary in length (some down to 300 or so rows, and others as far down to 5000+ rows!) depending on the number of products in each category.
The data is consistent in the sense that 'Base' is every 1st row, 'Promo' is every 2nd, 'Total Planned' is every 3rd, and 'Sales In' is every 4th.
What I would like to do (without having to protect each sheet, or go through and define each row) is to tell Excel that if the user goes in to edit either the 'Total Planned', or 'Sales In' rows, to prevent them from making any changes to these rows.
I saw something on here a while back in the knowledge base (found from an external link) where the code told Excel to protect every 3rd row, or column, or a defined range (the example sheet that was attached had all three as examples), but for the life of me I can't find it anywhere! Not even from the site I'm sure I found it through - I even remember saving the example file, but I can't even find that now!!
I've seen a few similar sets of code around here that protect a set range, or specific row, but they don't seem to allow for multiple sets of ranges (rows/columns).
Is there anyone that either knows the code I'm looking for and can direct me back to it, or someone that can show me how this would be done so that I can adjust the code for my own requirement?
Many thanks in advance.
Wai