Consulting

Results 1 to 8 of 8

Thread: VBA Coding extension

  1. #1

    Exclamation VBA Coding extension

    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
    Attached Files Attached Files

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    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.
    [VBA]If Target.Column = 7 Then 'Address = Sheet1.[GradeType].Address Then[/VBA]
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  3. #3
    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?

  4. #4
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Try this
    Attached Files Attached Files
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  5. #5
    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?

  6. #6
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Can you post the file P5.xlsx to which the workbook refers?
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  7. #7
    of course
    Attached Files Attached Files

  8. #8
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    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.
    Attached Files Attached Files
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •