Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Using Data Validation

I have a main worksheet with a Data Validation Drop Down List. There is
another worksheet where I have the list/s of information, I have called
INFO1. Let's say the first cell in the main sheet is K7. The data on the
INFO1 worksheet is in the following format:
A B
1 Red R
2 Green G
3 Blue B
4 Purple P
When I click on K7, I get the drop down list of A1 thru A4, and making a
selection returns the value in column A I clicked on. What I want to happen
is when I click on a cell in column A it will then return the value in
column
B only in cell K7. i.e. click A2 returns G in cell K7. The range I would
like this to work in is K7.K56. Hope I have asked this correctly. thanks
for the help......... Bill


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default Using Data Validation

You would need to use event code, like Worksheet_Change.

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A:A") Is Nothing Then
Range("K7") = Target.Offset(0, 1).Value
End If
End Sub

Copy this snippet to you sheet code module by right clicking
the sheet name tab, then click View Code in the pop up menu
to open the code window.



"retired bill" wrote in message
...
I have a main worksheet with a Data Validation Drop Down List. There is
another worksheet where I have the list/s of information, I have called
INFO1. Let's say the first cell in the main sheet is K7. The data on the
INFO1 worksheet is in the following format:
A B
1 Red R
2 Green G
3 Blue B
4 Purple P
When I click on K7, I get the drop down list of A1 thru A4, and making a
selection returns the value in column A I clicked on. What I want to
happen
is when I click on a cell in column A it will then return the value in
column
B only in cell K7. i.e. click A2 returns G in cell K7. The range I would
like this to work in is K7.K56. Hope I have asked this correctly. thanks
for the help......... Bill




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
custom data validation on cells with data validation values AKrobbins Excel Worksheet Functions 2 June 21st 11 04:20 PM
Validation Data using Validation Table cell range..... Dermot Excel Discussion (Misc queries) 16 January 5th 10 09:35 PM
data validation invalid in dynamic validation list ilia Excel Discussion (Misc queries) 0 November 7th 06 12:54 PM
data validation invalid in dynamic validation list ilia Excel Programming 0 November 7th 06 12:54 PM
Data validation with validation lists and combo boxs Keith Excel Discussion (Misc queries) 1 October 12th 06 11:08 AM


All times are GMT +1. The time now is 12:20 PM.

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

About Us

"It's about Microsoft Excel"