Use Combo box to replace a variable across entire spreadsheet

Helen842000

New Member
Joined
Mar 28, 2011
Messages
34
Hi all,

I have a dropdown box containing text strings. How can I use the selection from a combo box as part of a formula?

So for example I have a spreadsheet that is set up using a search term 'media', I want to select something else from the list e.g 'arts' and I want all of the references to 'media' to turn into 'arts' in the formulas. Kind of like a mass find and replace.

Any suggestions would be great! Thanks
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Helen842000,

The folowing assumes that you are using a form ComboBox and are not using vba.

Right click the Combo and go to the Format Control tab where I assume you have defined your Input Range for your search terms.
Determine a cell reference eg A17, that you can use as a 'helper' and input that as the Cell Link for the combo.

Then when you select from the combo the linked cell will take the index of the selected item from your list.

To keep your formulas simple you then need another 'helper' cell eg A18, with the formula that will return the slected search term.

eg c = item 3 from the list a,b,c

Excel 2007
A
173
18c

<COLGROUP><COL><COL></COLGROUP><THEAD>
</THEAD><TBODY>
</TBODY>
Sheet1

Worksheet Formulas
CellFormula
A18=INDEX(M1:M3,A17)

<THEAD>
</THEAD><TBODY>
</TBODY>

<TBODY>
</TBODY>
Your various formulas can then reference the text in A18.


Hope that helps.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,387
Messages
6,124,633
Members
449,177
Latest member
Sousanna Aristiadou

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top