Combobox

SPLUCENA

Board Regular
Joined
Feb 24, 2009
Messages
189
Hi,

My combobox source list is in column A1 of sheet2, on column B1 are other datas directly related to to A1. Is it possible to write a code that if I choose item 1 on column A1, the corresponding data on B1 will copied and pasted to range D10 of sheet1?

Code:
Range("B5").Value = ComboBox1.Value

somethinl like if RANGE("B5")=COMBOBOX1.VALUE THEN
RANGE("D10")=........... I CAN'T FIGURE OUT HOW TO WRITE THE CODE.

thanks,

splucena
 

Some videos you may like

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

onlyadrafter

Well-known Member
Joined
Aug 19, 2003
Messages
5,703
Platform
  1. Windows
Hello,

is this it?

Code:
With Sheets("Sheet1")
        .Range("b5").Value = ComboBox1.Value
        .Range("B10").Value = Sheets("Sheet2").Range("A1").Offset(ComboBox1.ListIndex, 1)
    End With
 

SPLUCENA

Board Regular
Joined
Feb 24, 2009
Messages
189
Hi Onlyadrafter,

Still I cannot copy the adjacent cell value with your code.
Thanks anyhow.


splucena
 

Watch MrExcel Video

Forum statistics

Threads
1,122,670
Messages
5,597,480
Members
414,143
Latest member
lonnie451

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