Combox1 & Combobox2 equals specific cell

MerryMaca

New Member
Joined
Aug 4, 2010
Messages
2
Hello!
I don't know how to name this thread but I tried my best :). I am new at excel so I have a lot to learn. But so far I have managed to use VLOOKUP and managed to set a Combobox1(wich are rows) with list that I want (A15:A500).
What I have problem with is that I want Combobox2 that I want to have two specific cells that I can choose between no matter what I choose in Combobox1. Then I want to have a result based from what I've choosen. So result will be in a Textbox1 (wich is specific cell from row and cell choosen in comboboxes).

For e.g. Combobox1: Bergdalen(A20) + Combobox2: Boggibil(C13) equals Textbox1: 342,00 kr(D20)

Here is a picture to make it more clear:

Namnls.jpg

Can anyone help please :)?
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

AlphaFrog

MrExcel MVP
Joined
Sep 2, 2009
Messages
16,451
This is what I understand.

If Combobox2 is "Boggibil", you want to return a value from column D. If Combobox2 is "Bil & Slap", you want to return a value from column F. Is that correct?

You can link cells to your two comboboxes and your textbox. For this example...
Link Combobox1 to cell A1
Link Combobox2 to cell B1
Link Textbox1 to cell C1

Put this formula in cell C1
Code:
=IF(OR(A1="",B1=""),"",INDEX(OFFSET(A15:A500,,IF(B1="Boggibil", 3,5)),MATCH(A1,A15:A500,0)))

The formula will calculate a value for your text box. If A1 or B1 is empty, then c1 will be empty. Otherwise it looks up the value from A1 in A15:A500 and then returns the value for column D or F depending on what is in cell B1.
 

MerryMaca

New Member
Joined
Aug 4, 2010
Messages
2
Hi Alpha,
yes ... that's exactly what I want. But D column is a result from B + C and F column is a result from B + E
... and I'm not at all good at codes :( ... what I did in combobox1 is that I changed ListFillRange to Område1!A15:A500(Sheet1 is "Område"), that is what I managed to do so far... but I would really like to learn, and I did learn a lot on this forum :)

What I had in mind is to have a combobox1 with list from column that begins from A5 and combobox2 with just cells C14 & E14 so if I choose a column(combobox1) and a row(combobox2) that it automaticlly shows in a textbox1 a result from multiplying those two .. I did multiply those separate in columns D & F to make it easier for me :)
But to make it work I need help with coding :)

P.S. .. my version is in Swedish.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,168,113
Messages
5,857,453
Members
431,880
Latest member
kar2rost

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
Top