More help needed with a macro

S

Suzie

Hi, I wonder if anyone would be kind to explain to me how I would make a
macro do the following:

I need to make a keyboard shortcut of Ctrl A to insert a new line on Row C12
whenever a new line is required. My formula in D5 is the average of the 5
most recent values from c12.c16, my formula in D3 is the total average of
all values c12..c#. So my macro has to insert the new row but still fix the
formulas and labels and prevent anyone from changing anything else expect
the information they are inputting in Row12. So the macro needs to
unprotect the worksheet, do all the required tasks then re-protect it whilst
still allowing access to row 12.

Sorry it sounds a bit of a muddle, but this stuff does that to me - lol

I have detailed my worksheet below and any help would be very much
appreciated. Suzie


CLIENT FEEDBACK / EVALUATIONS

To add a new evaluation Overall Evaluation 2.5 Quick Assessment
Press Ctrl+A
Recent Evaluations 2.5 Poor-Improving
To add a new operator
Select File New and CCRU_Summary Workbook Quick Review
The File Save As using the operators name as the filename Poor -
Improving

COMPANY NAME CALLER NAME EVALUATION RELEVANT COMMENTS
Don't Use this Line
1
2
3
4
Overall Evaluation 2.5
 
D

Dave Peterson

Maybe you could just insert the row normally, but change your formula:

For D5: Instead of this formula:
=AVERAGE(C12:C16)
try this:
=AVERAGE(INDIRECT("c12:c16"))

This always points at C12:C16 no matter what rows/columns you insert/delete.

Then for D3, if no numbers are ever entered in C1:c11, you could use:
=average(c:c)
or if you have numbers in those cells:
=average("c12:c65536")

(you could use any number that will always include your data)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top