![]() |
Change cell value when selection made from drop list in another ce
Please help me someone. I'm new at VBA but I know VB. I have several cells
with drop down lists. For example, column D rows 1-5 have drop down lists associated with them. When I click on the cell, the list pops up and I select a value. When that happens, I want to search for the selected text in column C. I then want to copy the values of columns C and D in the row where the text was found and paste those values in column E and F on the row where the drop down list was activated. I know this sounds complicated, and I hate to ask for someone else to write code for me. But this is a one time job that I need to do and I don't have time to become well versed in VB for Excell. I would appreciate the help. I am a Labview expert and I often help and write small code for other beginners in the Labview forum. So I guess I'm doing my part in one language and would like help in another language in return. -- Bob D Pirate |
Change cell value when selection made from drop list in another ce
Hi,
setting the linked cell will fail if you do it like this. see my response Mike "bobdpirate" wrote: Please help me someone. I'm new at VBA but I know VB. I have several cells with drop down lists. For example, column D rows 1-5 have drop down lists associated with them. When I click on the cell, the list pops up and I select a value. When that happens, I want to search for the selected text in column C. I then want to copy the values of columns C and D in the row where the text was found and paste those values in column E and F on the row where the drop down list was activated. I know this sounds complicated, and I hate to ask for someone else to write code for me. But this is a one time job that I need to do and I don't have time to become well versed in VB for Excell. I would appreciate the help. I am a Labview expert and I often help and write small code for other beginners in the Labview forum. So I guess I'm doing my part in one language and would like help in another language in return. -- Bob D Pirate |
Change cell value when selection made from drop list in anotherce
Hi Bob D Pirate
As this code is an event code it has to go into the code sheet for the desired worksheet. Private Sub Worksheet_Change(ByVal Target As Range) Set isect = Intersect(Target, Range("D1:D5")) ' Change range as desired If Not isect Is Nothing Then sText = Target.Value If sText = "" Then End Set f = Columns("C").Find(what:=sText, lookat:=xlWhole) If f Is Nothing Then msg = MsgBox("No match") Else Range(f).Resize(1, 2).Copy f.Offset(0, 1) End If End If End Sub Best regards, Per On 16 Jan., 22:37, bobdpirate wrote: Please help me someone. *I'm new at VBA but I know VB. *I have several cells with drop down lists. *For example, column D rows 1-5 have drop down lists associated with them. *When I click on the cell, the list pops up and I select a value. *When that happens, I want to search for the selected text in column C. *I then want to copy the values of columns C and D in the row where the text was found and paste those values in column E and F on the row where the drop down list was activated. *I know this sounds complicated, and I hate to ask for someone else to write code for me. *But this is a one time job that I need to do and I don't have time to become well versed in VB for Excell. *I would appreciate the help. *I am a Labview expert and I often help and write small code for other beginners in the Labview forum. *So I guess I'm doing my part in one language and would like help in another language *in return. -- Bob D Pirate |
Change cell value when selection made from drop list in anothe
Mike H: Where is your response?
-- Bob D Pirate "Mike H" wrote: Hi, setting the linked cell will fail if you do it like this. see my response Mike "bobdpirate" wrote: Please help me someone. I'm new at VBA but I know VB. I have several cells with drop down lists. For example, column D rows 1-5 have drop down lists associated with them. When I click on the cell, the list pops up and I select a value. When that happens, I want to search for the selected text in column C. I then want to copy the values of columns C and D in the row where the text was found and paste those values in column E and F on the row where the drop down list was activated. I know this sounds complicated, and I hate to ask for someone else to write code for me. But this is a one time job that I need to do and I don't have time to become well versed in VB for Excell. I would appreciate the help. I am a Labview expert and I often help and write small code for other beginners in the Labview forum. So I guess I'm doing my part in one language and would like help in another language in return. -- Bob D Pirate |
All times are GMT +1. The time now is 11:58 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com