UserForm to insert new data

G

Guest

I have a timecard with a different sheet for each week. Each sheet would
look something like this:
A B C D E
1 Date Day ---Charge#--- Hours
2 8/6 Monday 90015 cfle 5
3 600143 t77d 4
4 ----------Total: 9
5 8/7 Tuesday 90015 cfle 9
6 ----------Total: 9
7 8/8 Wednesday 90014 afba 3
8 601043 t77d 4
9 90079 t77d 2
10 ----------Total: 9
11 8/9 Thursday PTO 9
12 ----------Total: 9
13 8/10 Friday 601017 a1bd 9
14 ----------Total: 9

Each of the specific dates and days would be a merged cell with the one(s)
below.

I've created a UserForm (named "Entry_Form") with a ComboBox to select day
of the week ("Day_of_Week"), a ComboBox to select charge number
("Charge_Number") that's populated from another list, and a TextBox w/ spin
button to select hours ("Hours"). This part of the form is working fine.

Basically what I need is a code for the "OK" button. What I'd like it to do
is to take the information that's selected in the 2 ComboBox's and in the
TextBox and populate the correct fields. A new sheet would have the same
rows/columns described above, but with only 2 rows per day (one for the
date/day and the second for the Total row). The "OK" button would take the
selected day, and if no charge# had been entered yet, it would populate the
first row with that data. On subsequent entries, it would insert a new row
between the first row and the Total row (expanding the merged Date and Day
cells and ensuring that the sum formula after Total includes the new row).

Any help would be greatly appreciated! Let me know if this is confusing and
I can try to answer questions or explain better.
 
G

Guest

I forgot to mention that the Charge# is a 2-part number. The first half is
in column C and the 2nd half is in column D. The source list for the
Charge#'s has the numbers in 2 columns as well, and I used the CONCATENATE
formula to merge the numbers together for the ComboBox. For example:
A B C
FirstHalf SecondHalf =concatenate(A1," ",B1)

In populating the timecard (after clicking "OK"), the Charge # would need to
be split on the space and the 2 halves entered into the 2 columns.
 

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

Similar Threads


Top