Results 1 to 7 of 7

Run code on any selection from validation list

Threaded View

  1. #1
    Forum Contributor
    Join Date
    07-30-2012
    Location
    Leeds
    MS-Off Ver
    Excel 2013
    Posts
    177

    Run code on any selection from validation list

    Hello all,
    I have a long piece of code currently attached to a button, but I would like to code to run whenever a selection is made from the dropdown list in cell C4 in the 'Feedback' sheet. The code starts
    Sub mcrpasteformulaandcommentlist()
        ActiveWindow.SmallScroll Down:=23
        Range("C50").Select
        ActiveCell.FormulaR1C1 = _
            "=IF(R[-43]C[1]=""y"",(CONCATENATE(""Well Done "",LEFT(R4C3,FIND("" "",R4C3)-1),"" you have completed "",R[-43]C[-2],"" "",R[-43]C)),IF(R[-43]C[1]=""n"",CONCATENATE(""Please use the "",R[-43]C[-2],"" user guide to complete "",R[-43]C),IF(R[-43]C[1]=""I"",""Teacher Comment Required"","""")))"
        Range("C51").Select
        ActiveWindow.SmallScroll Down:=-36
        Range("G7").Select
        ActiveCell.FormulaR1C1 = _
            "=IF(RC[-3]=""y"",(CONCATENATE(""Well Done "",LEFT(R4C3,FIND("" "",R4C3)-1),"" you have completed "",RC[-6],"" "",RC[-4])),IF(RC[-3]=""n"",CONCATENATE(""Please use the "",RC[-6],"" user guide to complete "",RC[-4]),IF(RC[-3]=""I"",""Teacher Comment Required"","""")))"
        Range("G7").Select
        Selection.AutoFill Destination:=Range("G7:G26")
        Range("G7:G26").Select
        Range("G7:G26").Select
        Range("G8").Activate
    there is more code after that but I couldn't insert it here. Is there a prefix or coding for applying this to the validation list selection?

    Many Thanks!

    Luke
    Attached Files Attached Files
    Last edited by lukestkd; 09-30-2012 at 10:01 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1