LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Bob is offline
external usenet poster
 
Posts: 972
Default Data Validation using multiple columns

In a Data Validation dropdown, I need to display more than one column of
data, but only "store" the value from the first column? For example:

Column A = ID Number (4 characters long)
Column B = Last Name
Column C = First Name
Column D = Column A & €œ €œ & Column B & €œ €œ & Column C
Column E = Data Validation where Source = $D1:$D20

When a user clicks on the Data Validation dropdown arrow, the dropdown would
display the ID Number, Last Name, and First Name. But once a person is
selected, only the ID Number would be "stored" in the cell.

€œexcelent€ was kind enough to provide me with the following macro:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("E6:E20")) Is Nothing Then Exit Sub
Target = Left(Target, 4)
End Sub

Unfortunately, after I select a name from the dropdown list, the list stays
open and Excel appears to lock up until I press the Esc key. Then I get a
"Code execution has been interrupted" error message.

Can anyone tell me how to modify the macro above so that it works properly?
Any help would be greatly appreciated.
Bob

 
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 across multiple columns AKrobbins Excel Worksheet Functions 1 May 6th 11 04:15 PM
Data Validation on multiple columns NDBC Excel Discussion (Misc queries) 3 August 19th 09 03:22 AM
Data Validation & multiple columns Bob Excel Discussion (Misc queries) 1 April 9th 07 10:24 AM
Data validation for Multiple columns NC Excel Discussion (Misc queries) 2 May 11th 05 01:51 PM


All times are GMT +1. The time now is 11:50 PM.

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"