Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
spitcher
 
Posts: n/a
Default create a list box in one cell of state abbreviations

How do I create a list box within a cell of state abbreviations which i can
then use as a lookup reference for a formula applying tax rates.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max
 
Posts: n/a
Default create a list box in one cell of state abbreviations

"spitcher" wrote
How do I create a list box within a cell
of state abbreviations which i can
then use as a lookup reference for a formula applying tax rates.


A data validation (DV) droplist
would also do the job nicely

Try this little experiment

In Sheet1,

List the state abbrevs in A1 down, eg:
AAA
BBB
CCC
etc

Now we'll create a dynamic range for the list,
which can then be referred to / used in
any other sheet within the book

Click Insert Name Define
and insert, under:
Names in workbook: StateAbbrv
Refers to:
=OFFSET(Sheet1!$A$1,,,COUNTA(Sheet1!$A:$A))
Click OK

In say, Sheet2,
Suppose we want the DV droplist to be within A2:A10

Select A2:A10
Click Data Validation
and make the settings:
Allow: List
Source: =StateAbbrv
Click OK

Test it out .. When we click on say, A3,
we'd get the droplist to select the state abbrv

(using a dynamic range allows us to easily maintain
the DV list via editing the source in Sheet1)

For an intro and more on data validation,
see Debra's comprehensive coverage at her:
http://www.contextures.com/xlDataVal01.html
(as a start, there's other pages on DV)

--------

For a listbox play ..
(assuming we've set up the dynamic range above)

In say, Sheet3

Draw a listbox from the Forms toolbar
Right-click Format Control
and insert under:
Input range: StateAbbrv
Cell link: $B$1 (say)

You should see the list box populated
with the items from StateAbbrv

Clicking on / selecting the item in the listbox
will put its corresponding number into the cell link, B1
(eg, selecting CCC will place: 3 into B1)

And if we want to retrieve the state abbrevs itself,
we could put in say, C1: =INDEX(StateAbbrv,B1)

Alternatively, a more direct way
to put the listbox selection into the linked cell itself
would be to use a listbox from the Control toolbox

Draw a listbox from the Control toolbox
Right-click Properties
and then key-in for:
ListFillRange: StateAbbrv
LinkedCell: E1 (say)

Then uncheck the triangle icon to exit design mode

Test it out, selecting CCC in the listbox
would put: CCC into the linked cell E1, and so on

Activate the Forms / Control toolbars if necessary
via clicking: View Toolbars
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


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
copying cell names Al Excel Discussion (Misc queries) 12 August 11th 05 03:01 PM
CREATE LIST OBJECT IN EXCEL MIKE Excel Worksheet Functions 0 June 20th 05 08:13 AM
Can a cell have a drop down list and can also be auto populated Adrian Excel Worksheet Functions 1 March 17th 05 05:05 AM
how to create a variable column in cell reference Sampson Excel Worksheet Functions 3 February 21st 05 10:13 PM
How do I create a bulleted list text format inside cell? DEH Excel Discussion (Misc queries) 5 February 1st 05 07:37 AM


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