Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default ComboBoxes and Formulas

How do I get a formula to recognize a selection from a
Combo Box that I created from the Control Toolbox?

For example, if the LinkedCell is A2 and the formula in B2
uses the chosen value in A2 as the reference for a VLOOKUP
formula, what do I need to do to make the value in A2
recognizable to the formula in B2?

Do I have to do anything in Properties, or enter something
in the VBE?

Thanks.

EU
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default ComboBoxes and Formulas

1. In a worksheet formula you have to use the linked cell to index
your range of values thus :-
=INDEX(H1:H6,A2,1)

2. In a macro you can get the selected value directly with something
like :-
MyValue = ActiveSheet.ComboBox1.Value

Use of *Controls toolbox* controls in a worksheet is not recommended
because they are extremely prone to bugs. Use those from the *Forms*
toolbox in preference. In this case you can only use the INDEX()
method to get the selected value.


Regards
BrianB
==================================================

"excel user" wrote in message ...
How do I get a formula to recognize a selection from a
Combo Box that I created from the Control Toolbox?

For example, if the LinkedCell is A2 and the formula in B2
uses the chosen value in A2 as the reference for a VLOOKUP
formula, what do I need to do to make the value in A2
recognizable to the formula in B2?

Do I have to do anything in Properties, or enter something
in the VBE?

Thanks.

EU

  #3   Report Post  
Posted to microsoft.public.excel.programming
EU EU is offline
external usenet poster
 
Posts: 1
Default ComboBoxes and Formulas

Thanks, Brian. I went with the Index formula and it works
perfectly!
Regards,
EU
-----Original Message-----
1. In a worksheet formula you have to use the linked cell

to index
your range of values thus :-
=INDEX(H1:H6,A2,1)

2. In a macro you can get the selected value directly

with something
like :-
MyValue = ActiveSheet.ComboBox1.Value

Use of *Controls toolbox* controls in a worksheet is not

recommended
because they are extremely prone to bugs. Use those from

the *Forms*
toolbox in preference. In this case you can only use the

INDEX()
method to get the selected value.


Regards
BrianB
================================================= =

"excel user" wrote in message

...
How do I get a formula to recognize a selection from a
Combo Box that I created from the Control Toolbox?

For example, if the LinkedCell is A2 and the formula in

B2
uses the chosen value in A2 as the reference for a

VLOOKUP
formula, what do I need to do to make the value in A2
recognizable to the formula in B2?

Do I have to do anything in Properties, or enter

something
in the VBE?

Thanks.

EU

.

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
comboboxes [email protected] uk Excel Discussion (Misc queries) 1 December 6th 09 05:07 PM
Comboboxes mr-bear New Users to Excel 1 November 21st 06 10:05 AM
Urgent Help, Comboboxes and IF. R.Chapman Excel Discussion (Misc queries) 1 February 16th 06 07:50 PM
Need help with ComboBoxes. rosemary New Users to Excel 2 July 9th 05 12:19 AM
Comboboxes David W[_3_] Excel Programming 1 August 29th 03 11:13 PM


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