PDA

View Full Version : VBA Coding extension



unknown_1994
12-07-2011, 12:06 PM
I had a problem with saving and retaining data within a spreadsheet designed to function as a school assessment system, I was given VBA code to help solve the problem and the current problem has been solved however I wish for the code to be extended throughout the sheet and slightly modified so that each individual toggle option KS4 grades/Effort, KS3grades/effort can be utilized to the same effect.

Attainment/effort works perfectly due to the code.

Please see attachment and reply A.S.A.P

mdmackillop
12-07-2011, 12:38 PM
Welcome to VBAX. I'm not clear what should happen on the change, but this will run the code on changing any of the Column G cells
Try changing this line as follows.
If Target.Column = 7 Then 'Address = Sheet1.[GradeType].Address Then

unknown_1994
12-07-2011, 12:46 PM
I apologise for the lack of clarity and thank your for your quick response and warm welcome.

As you can see in cell G4 there is the attainment and effort drop-down validation box and as you select each one the data changes I desire that same effect however in cell G66, and cell G166. Is it possible that you could implement the coding for me as I am a relative novice in VBA I have no idea how to implement the line of code and send it back?

mdmackillop
12-07-2011, 12:55 PM
Try this

unknown_1994
12-07-2011, 02:01 PM
I'm afraid that not only does the attempted solution fail, but the already resolved section has stopped working as well.

If the current code that has been implemented is causing you a problem you can remove it and make a direct code that addresses the problem if that would be easier for you?

mdmackillop
12-07-2011, 02:44 PM
Can you post the file P5.xlsx to which the workbook refers?

unknown_1994
12-07-2011, 03:50 PM
of course

mdmackillop
12-15-2011, 04:39 PM
Give this a try. Hope it works as I'm off on holiday from tomorrow am
The code copies the block of info to the same row on Save, to column 1 or 13 depending on value, and copies back the corresponding block.