#1   Report Post  
Hardy
 
Posts: n/a
Default coding

I have two pages in a workbook. In page one I have lists in cells that are
validated by cells in page 2.
What I would like is, next to the cell that is validated, have a cell that
has a relevant code eg. If cell A1 has a list box that has fruit names in
Apple, pear etc (Validated from A1 in page 2) I would like B1 in page 1 to
have a code for each (Apple = 1, Pear = 2)
So that if a user chooses Apple from the drop down 1 will appear in the next
cell, if they change it to Pear from the list 2 appears etc.
  #2   Report Post  
Max
 
Posts: n/a
Default

Think a combo box (from the forms toolbar) could give you the desired
behaviour ..

Try this simple set-up

In Sheet2
----
List down in A1:A3 : Apple, Pear, Orange

In Sheet1
----
From the Forms toolbar*
Click on combo box, then draw a combo box over cell A1
(hold down the ALT key when drawing to make it snap to fit to grid)

*Click View Toolbars Forms to activate the toolbar if necess.

Right-click Format Control

Enter for
Input range: Sheet2!$A$1:$A$3
Cell link: B1
Click OK

Try out the combo box:
Select Apple, B1 returns: 1 (as Apple is the first item in the list)
Selecting Pear returns 2, selecting Orange returns 3, and so on
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Hardy" wrote in message
...
I have two pages in a workbook. In page one I have lists in cells that are
validated by cells in page 2.
What I would like is, next to the cell that is validated, have a cell that
has a relevant code eg. If cell A1 has a list box that has fruit names in
Apple, pear etc (Validated from A1 in page 2) I would like B1 in page 1

to
have a code for each (Apple = 1, Pear = 2)
So that if a user chooses Apple from the drop down 1 will appear in the

next
cell, if they change it to Pear from the list 2 appears etc.



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
Referring to Previous Worksheet - coding Denis Excel Worksheet Functions 7 December 10th 04 05:24 PM


All times are GMT +1. The time now is 06:28 AM.

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"