ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Populating a combo box (https://www.excelbanter.com/excel-programming/352775-populating-combo-box.html)

John in Surrey

Populating a combo box
 
Hi folks
I have a table of patient data and I wish to selected a vacant bed
from a combo box or using data valadation .
this vacant bed list would be made up from bed 1 to bed 20 minus the
beds already is use, listed in the range containing the bed list
J5:J20

can anyone give me any pointers for the direction I should be looking
in...
thanks
john



Images of home (NZ)
http://www.titahi-bay.co.nz/home
What we are up to in the UK
http://www.titahi-bay.co.nz

Tom Ogilvy

Populating a combo box
 
set rng = Range("I5:i20")
me.combobox1.Clear
for each cell in rng
if isempty(cell) then
me.combobox1.addItem cell.offset(0,1).Value
end if
Next

for data validation, you would need to set up an area where you can create
the list using formulas. then set that as the source of the
Data=Validation list

You would need to explain in more detail about how the beds are identified
as available or not with specific sheet names, ranges and values in those
ranges, including the location of the data validation. (sheet, cells)

--
Regards,
Tom Ogilvy


"John in Surrey" wrote in message
...
Hi folks
I have a table of patient data and I wish to selected a vacant bed
from a combo box or using data valadation .
this vacant bed list would be made up from bed 1 to bed 20 minus the
beds already is use, listed in the range containing the bed list
J5:J20

can anyone give me any pointers for the direction I should be looking
in...
thanks
john



Images of home (NZ)
http://www.titahi-bay.co.nz/home
What we are up to in the UK
http://www.titahi-bay.co.nz





All times are GMT +1. The time now is 10:21 AM.

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