Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data validation drop down list selection change Mekinnik Excel Programming 4 October 17th 07 01:22 PM
Selection of Drop down list that allows you to go to a particular cell Daphne Excel Worksheet Functions 2 June 14th 06 09:54 AM
Having A Macro Run When A Selection Is Made In A List Box Compnerd Excel Programming 3 March 5th 05 09:03 PM
Drop Down List Selection... Then go to The Cell / Range John[_78_] Excel Programming 3 October 30th 04 12:09 AM
Macro to change list box input range based on selection made in another cell Sue[_6_] Excel Programming 3 October 7th 04 06:45 PM


All times are GMT +1. The time now is 10:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"