Posts by qqtest

    I am attempting to create a code that copies a row to another sheet based on selections in columns G and F. I cannot figure out how to run both at once!




    I am attempting to run this code:



    --------------------------------------------------------------------------


    At the same time as running the code below:


    Code
    Private Sub Worksheet_Change(ByVal Target As Range)
    If Intersect(Target, Range("F:F")) Is Nothing Then Exit Sub
    If Target = "Clouded" Then
    Target.EntireRow.Copy Sheets("Radi").Cells(Rows.Count, "A").End(xlUp).Offset(1, 0)
    End If
    If Intersect(Target, Range("F:F")) Is Nothing Then Exit Sub
    If Target = "Faxed" Then
    Target.EntireRow.Copy Sheets("Fax").Cells(Rows.Count, "A").End(xlUp).Offset(1, 0)
    End If
    End Sub


    ----------------------------------------------------------------------------


    How can I run both at the same time?

    [SIZE=14px]Thanks in advance for help, I am new to VBA and really appreciate it!


    I have created a workbook that I am hoping will help to organize my clinic's record requests. The plan is to be able to input information (under the "Input" sheet) and to then be able to direct the information to another sheet by making a selection in the "Provider" column (F) or the "Type of Record" Column (G).


    If "AG" is selected in column "F" in input sheet> entire row is copied to the "AG" Sheet
    If "DS" is selected in column "F" in input sheet> entire row is copied to the "DS" Sheet
    If "NL" is selected in column "F" in input sheet > entire row is copied to the "NL" Sheet
    If "EH" is selected in column "F" in input sheet> entire row is copied to the "EH" Sheet
    If "JH" is selected in column "F" in input sheet> entire row is copied to the "JH" Sheet
    If "RW" is selected in column "F" in input sheet> entire row is copied to the "RW" Sheet
    If "LS" is selected in column "F" in input sheet> entire row is copied to the "LS" Sheet
    If "SP" is selected in column "F" in input sheet> entire row is copied to the "SP" Sheet


    If "Clouded Images" is selected in column "G" in input sheet> entire row is copied to the "Rad Cloud" Sheet
    If "Faxed Record" is selected in column "G" in input sheet> entire row is copied to the "Faxed" Sheet
    [/SIZE]


    I have entered some code that does not seem to work, please let me know what I am doing wrong!

    I don't think I was as detailed as I meant today in my description of what I'm trying to build.


    I am attempting to build a workbook where data will be input on one sheet (“Clinical”) and depending on selection from drop down menu in column “A” would then copy the entire row to a separate sheet (i.e. “Clouded Images” to “Rad”, “Faxed Record” to “Ref” and “Patient Supplied” to “Front”). I am new to VBA, as you can probably tell, so thank you for your help and patience.