• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

to update combobox [SOLVED]

hanim554

Member
Dear friend,


i wonder if i can have help on the below


i have two combobox name fromhour and tohour and another 24 combobox with name h1 to h24

below example will make clear what i am trying to get


example1 : if fromhour is selected as 10 and tohour as 15, then i want to update h10 to h15 with number 10 to 15 rest are blank.

example2 : if fromhour is selected as 2and tohour as 9, then i want to update h2 to h9 with number 2 to 9rest are blank.

example2 : if fromhour is selected as 1 and tohour as 1, then i want to update h1 with number 1 and rest 9rest are blank.


Regards

Hanim
 
Let's assume a1:A24 are the input range for fromhour and tohour.

fromhour is linked to B1

tohouse is linked to B2

formula in C1:

=B1

formula in C2:

=IF(OR(SUM(C1,1)>$B$2,C1=""),"",C1+1)

copy down to C4


Define this named range DynRange with formula:

=OFFSET(Sheet1!$C$1,0,0,COUNT(Sheet1!$C$1:$C$24),1)


Then, input range for the 24 combobox is:

'My Workbook.xls'!DynRange


adjust workbook name to suit.
 
Back
Top