?
Solved

VBA Excel

Posted on 2009-12-18
6
Medium Priority
?
323 Views
Last Modified: 2013-11-25
Hi,
I'm new to Excel VBA code. Most of my experience comes from Outlook but I'm guessing\hoping the principles and logic are the same and that Exp Exch can save me time hunting around books and the net.
I want to create a single selection drop down list (items, a, b, c, d, e) for an Excel 2003 spreadsheet based on a single cell (say A3). When a user selects an item from the A3 cell drop down list another cell (A4) will auto-fill with a value.

Any help much appreciated.
John
0
Comment
Question by:JP53
  • 3
  • 2
6 Comments
 
LVL 5

Expert Comment

by:ghoshsaikat83
ID: 26079774
Something like that ???
SAMPLE.xls
0
 

Author Comment

by:JP53
ID: 26080050
Yes, but you've lost me. I was expecting a VBA module. How do I reproduce it?
0
 

Author Comment

by:JP53
ID: 26190850
Hi,

Are you there?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 3

Expert Comment

by:Mutsop
ID: 26190942
Hi,

Well the thing is you actually don't need vba to do that...

First activate you form buttons in your toolbar,
select the dropdown box (and draw one :p )
Write down the values in your cells
and afterwards select them in the properties of your dropdown box.

HINT your range (values of list) doesn't need to be on your first sheet :)
and you can use the INDEX() function to recall the name(value) of your selected item.

Aside from that may I know why you actually need it to be in vba?
As it is much more complex.
0
 

Author Comment

by:JP53
ID: 26191682
Hi,
I'll go with your version. I've set up the drop down and put in the value range and link cell so whatever the user selects from the drop down appears in the cell. Can you give me a worked example of how you translate characters in your drop down into a numerical value.
Thanks
0
 
LVL 3

Accepted Solution

by:
Mutsop earned 2000 total points
ID: 26191969
Well select the cell where you want the reference value to be
and enter

=INDEX(A2:A7;C1)

In this code A2:A7 is the range of selection of your combobox
and C1 being the cell of  your numerical value.

fyi: copy paste this in the example 'ghoshsaikat83' gave you... the cells match.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This article describes a serious pitfall that can happen when deleting shapes using VBA.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question