ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Combo box problem (https://www.excelbanter.com/excel-programming/332954-combo-box-problem.html)

run_PAFC

Combo box problem
 

Just supposing I have 3 fields in columns A, B and C named Item,
Quantity and Price, I want to know how to get all of this data to
appear in a combo box. Does anybody know how to do this?

Then, if one record was selected from the combo box, I want this record
to be placed somewhere else on the spreadsheet e.g. to the right of the
combo box. Is there an easy way of doing this?

Thanks in advance.

James


--
run_PAFC
------------------------------------------------------------------------
run_PAFC's Profile: http://www.excelforum.com/member.php...o&userid=24673
View this thread: http://www.excelforum.com/showthread...hreadid=382565


Dave Peterson[_5_]

Combo box problem
 
I put a combobox from the Control toolbox toolbar on a worksheet.

While still in design mode, I assiged the listfillrange to A1:C10 (three
columns).

I also set the .columncount to 3

I made the linked cell D1.

I put this formula in E1:
=if(d1="","",vlookup(d1,$a$1:$c$10,2,false))
and in F1:
=if(d1="","",vlookup(d1,$a$1:$c$10,3,false))

This worked if column A had unique values.





run_PAFC wrote:

Just supposing I have 3 fields in columns A, B and C named Item,
Quantity and Price, I want to know how to get all of this data to
appear in a combo box. Does anybody know how to do this?

Then, if one record was selected from the combo box, I want this record
to be placed somewhere else on the spreadsheet e.g. to the right of the
combo box. Is there an easy way of doing this?

Thanks in advance.

James

--
run_PAFC
------------------------------------------------------------------------
run_PAFC's Profile: http://www.excelforum.com/member.php...o&userid=24673
View this thread: http://www.excelforum.com/showthread...hreadid=382565


--

Dave Peterson

run_PAFC[_2_]

Combo box problem
 

Dave,

Thank you for your reply. It works!

Many thanks.

James


--
run_PAFC
------------------------------------------------------------------------
run_PAFC's Profile: http://www.excelforum.com/member.php...o&userid=24673
View this thread: http://www.excelforum.com/showthread...hreadid=382565


run_PAFC[_3_]

Combo box problem
 

I am now puzzled as to why, what seems, exactly the same thing won't for
different data. I have 3 fields 'Part Number', 'Part description' and
'part price'. I want to shift the records in these fields to a
different area on the spreadsheet. I have all of the data in the combo
box and have created the lookups etc, however when I select a record
from the combo box 'part description' and 'part price' return with #N/A
where I want the correct values to be. Any suggestions as to why this
is occurring?

I have been puzzled all day so any help would be appreciated!

Thanks,
James


--
run_PAFC
------------------------------------------------------------------------
run_PAFC's Profile: http://www.excelforum.com/member.php...o&userid=24673
View this thread: http://www.excelforum.com/showthread...hreadid=382565


Dave Peterson[_5_]

Combo box problem
 
my bet is your formula is wrong.

Either it's using the wrong cell to look for--or it's using the wrong range as
the lookup table.



run_PAFC wrote:

I am now puzzled as to why, what seems, exactly the same thing won't for
different data. I have 3 fields 'Part Number', 'Part description' and
'part price'. I want to shift the records in these fields to a
different area on the spreadsheet. I have all of the data in the combo
box and have created the lookups etc, however when I select a record
from the combo box 'part description' and 'part price' return with #N/A
where I want the correct values to be. Any suggestions as to why this
is occurring?

I have been puzzled all day so any help would be appreciated!

Thanks,
James

--
run_PAFC
------------------------------------------------------------------------
run_PAFC's Profile: http://www.excelforum.com/member.php...o&userid=24673
View this thread: http://www.excelforum.com/showthread...hreadid=382565


--

Dave Peterson


All times are GMT +1. The time now is 05:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com