Combo Box

Z

zephyr

I have a combo box linked to cells in a column Cell B5 to B10. In Cell B4 the
numbers 1 to 6 appear. I want Cell A5 to contain the text from the selected
cell. For instance B7 contains the word Sales, when Sales is selected from
the combo box the number 3 appears in Cell B4 and A5. I require the word
Sales to appear in Cell A5. Can you advise how to do this?

Many thanks for any assistance.
 
B

Bob Phillips

=INDEX(B5:B10,B4)

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
J

Joel

If youo double click the combobox a macro should be create when you are in
design mode. To get into design mode

1) View menu - tool bars - Command control
clik on triangle on tool bar. double click combobox
2) Then click on property on tool bar and again click combox
Listfillrange should be B5:B10
3) Add the two ranges to the comboxbox code

Private Sub ComboBox1_Change()
Range("B4") = ComboBox1.ListIndex + 1
Range("A5") = ComboBox1.Text
End Sub

4) On tool bar exit design mode by pressing triangle.
5) The combox box should not automatically change the two cells
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top