Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default validation - how to show the second column

I've highlited a column and put a validation having the range in a different
spreadsheet. In the spreadsheet with the range I have to columns - Code and
Description. But, for the validation I'm using only the first Code column for
data entries.
The validation is working well but a user entering Code can see only Code.
It would be nice to show the user the Description as well - not for entries
but just to see the Code's description.

How could I show the user the second column?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default validation - how to show the second column

Hi,
You could use VLOOKUP to display description in adjacent column to
Code entry.

Code in Column A, Description to be placed in B, then in col B - starting
row 2, put:

=F(iserror(vlookup(A2,MyTable,2,false)), " ",vlookup(A2,MyTable,2,false))

where "MyTable" is named range containing Code and Description.

Copy down in column B.

HTH

"Alex" wrote:

I've highlited a column and put a validation having the range in a different
spreadsheet. In the spreadsheet with the range I have to columns - Code and
Description. But, for the validation I'm using only the first Code column for
data entries.
The validation is working well but a user entering Code can see only Code.
It would be nice to show the user the Description as well - not for entries
but just to see the Code's description.

How could I show the user the second column?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default validation - how to show the second column

Thanks a lot Toppers.
But, I wouldn't like to enter the data from the Description column. I'd like
just to show it to the user during the Code entries as in MS Access for the
second (or more) not bound column in a combobox.

"Toppers" wrote:

Hi,
You could use VLOOKUP to display description in adjacent column to
Code entry.

Code in Column A, Description to be placed in B, then in col B - starting
row 2, put:

=F(iserror(vlookup(A2,MyTable,2,false)), " ",vlookup(A2,MyTable,2,false))

where "MyTable" is named range containing Code and Description.

Copy down in column B.

HTH

"Alex" wrote:

I've highlited a column and put a validation having the range in a different
spreadsheet. In the spreadsheet with the range I have to columns - Code and
Description. But, for the validation I'm using only the first Code column for
data entries.
The validation is working well but a user entering Code can see only Code.
It would be nice to show the user the Description as well - not for entries
but just to see the Code's description.

How could I show the user the second column?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default validation - how to show the second column

Using the worksheet change event you could try several options.

restrict the change event by using

Private Sub Worksheet_Change(ByVal Target As Range)
Dim str as String
If Target.Address = $A$1 ' set to cell adress of Data
Validation
str = worksheetfunction.Vlookup(target,LookupTable,2,2fa lse)
With Target.Validation
.InputMessage = str
End With

End Sub

or you can use a variation on this to create or edit the cells comment,
making sure that
the comment is visible at all times (or only visible when the cell is the
active cell)

--
steveB

Remove "AYN" from email to respond
"Alex" wrote in message
...
Thanks a lot Toppers.
But, I wouldn't like to enter the data from the Description column. I'd
like
just to show it to the user during the Code entries as in MS Access for
the
second (or more) not bound column in a combobox.

"Toppers" wrote:

Hi,
You could use VLOOKUP to display description in adjacent column to
Code entry.

Code in Column A, Description to be placed in B, then in col B -
starting
row 2, put:

=F(iserror(vlookup(A2,MyTable,2,false)), " ",vlookup(A2,MyTable,2,false))

where "MyTable" is named range containing Code and Description.

Copy down in column B.

HTH

"Alex" wrote:

I've highlited a column and put a validation having the range in a
different
spreadsheet. In the spreadsheet with the range I have to columns - Code
and
Description. But, for the validation I'm using only the first Code
column for
data entries.
The validation is working well but a user entering Code can see only
Code.
It would be nice to show the user the Description as well - not for
entries
but just to see the Code's description.

How could I show the user the second column?



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
Show Codes for Data Validation lists? Roady Excel Discussion (Misc queries) 1 May 25th 08 12:41 AM
one column of cells show ####. Values show when I open it. Help grantljg Excel Discussion (Misc queries) 3 September 18th 07 09:19 PM
show more items in validation list jenn Excel Worksheet Functions 1 December 11th 06 07:43 PM
Data Validation Drop Down List - Always Show Louise Excel Discussion (Misc queries) 1 September 18th 06 12:26 PM
Set Validation list to show top item Tod Excel Programming 3 June 29th 04 03:45 PM


All times are GMT +1. The time now is 10:40 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"