Populate User Form Text Box from Worksheet?

T

Ted

I have a data sheet, "Sheet1"

A B C D E F G
mon Tue Wed Thu Fri Sat Sun
3 5 6 5 8 10 12

The numbers in row 2 are averages. They are different for each day of the
week. They change daily based on data input by the user.

I have a User Form. It has the following controls:

1. A combo box, with the 7 days of the week; Monday through Sunday. The
user selects one of the 7 days.
2. A "buffer" text box. I have it set to initialize with the value 0.10
3. An "Order" text box. I would like it to initially populate with the
appropriate value (based on the selected day of the week) that is contained
in Sheet1, row 2, increased by the number in the "buffer" box, rounded up to
the nearest whole number.

For example, if the user selects "Wednesday" from the Combo box, I would
like the "Order" box to initialize with the value 7. [6+(0.10*6)]. The
value must always round up. If the user selected Sunday, then the "Order"
box should populate with the value 14 -- [12+(0.10*12), rounded up]

How do I do this?

Also, if the user changed the 'buffer' number, how would I get the order to
recalculate?

Please advise if clarification is needed. Otherwise thank you.
 
T

Ted

Very helpful. Thank you :)

Dennis Tucker said:
See sample attached.


Ted said:
I have a data sheet, "Sheet1"

A B C D E F G
mon Tue Wed Thu Fri Sat Sun
3 5 6 5 8 10 12

The numbers in row 2 are averages. They are different for each day of
the
week. They change daily based on data input by the user.

I have a User Form. It has the following controls:

1. A combo box, with the 7 days of the week; Monday through Sunday. The
user selects one of the 7 days.
2. A "buffer" text box. I have it set to initialize with the value 0.10
3. An "Order" text box. I would like it to initially populate with the
appropriate value (based on the selected day of the week) that is
contained in Sheet1, row 2, increased by the number in the "buffer" box,
rounded up to the nearest whole number.

For example, if the user selects "Wednesday" from the Combo box, I would
like the "Order" box to initialize with the value 7. [6+(0.10*6)]. The
value must always round up. If the user selected Sunday, then the
"Order"
box should populate with the value 14 -- [12+(0.10*12), rounded up]

How do I do this?

Also, if the user changed the 'buffer' number, how would I get the order
to recalculate?

Please advise if clarification is needed. Otherwise thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top