I am attempting to create a workbook that copies the entire text of a row to another spreadsheet depending on the selection from a drop down list. Example if "option 1" is selected from a drop-down menu on "sheet 1" then the entire row is copied to "sheet 2". Thanks in advance for your help!
How to Copy Entire Row to Another Worksheet Depending on Selection From Dropdown Menu
-
qqtest -
July 16, 2018 at 8:23 PM -
Thread is marked as Resolved.
-
-
-
Copy and paste this macro into the worksheet code module. Do the following: right click the tab for your Sheet1 and click 'View Code'. Paste the macro into the empty code window that opens up. [SIZE=13px]Since you didn't say in which column the drop down list is found, I used column A. Change the target range in the code to suit your needs. [/SIZE] Close the code window to return to your sheet. Make a selection in the drop down list.
-
Thank you so much for your help!
When I use this code I receive a pop-up that reads "Compile Error: Expected End Sub", what am I doing wrong?
-
I'm not sure why you are getting the error. Are you using the code as written or have you modified it in some way? Perhaps you could post a copy of your file. De-sensitize the data if necessary.
-
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.
-
-
Here is the basic setup I am trying to work with.
-
Try the attached file.
-
This is the workbook I've been working on, is there a way to easily change the drop down menu to be the last column(E) instead of the first (A)?
-
Sorry for the delay. I've been out of town. The drop down list in column E is different from that in column A. I would have to know which sheet to copy to for each value in the list in column E.
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!