Lets see if I can explain this correctly.
I am very new to the world of VBA etc, I have worked with spreadsheets for a while now and have never had to look into the more advanced side of things but I took on this project and now I seem to be stuck. I have almost the end product but stuck with the following.
I am in the middle of creating a spreadsheet allocating times for people to attend my office. The day they attend will be determined by the last two digits of their national insurance number. I have made my userform for the information I need to record and put into the spreadsheet (National Insurance Number (NINO for short), Surname, Initials, Date of first contact, Date of Birth). (For those of you who are outside the UK National Insurance Number format is as follows: AB123456A). If the last two digits of their NINO are even then it will be week 1, if they are odd it will be week 2. The day of the week is decided as follows:
Monday - 00 - 19, Tuesday - 20 - 39, Wednesday - 40 - 59, Thursday - 60 - 79 and Friday - 80 - 99.
I have the formula on a separate sheet which works this out as follows:
=MID(cell where NINO is input,7,2)+0 - lets the next line know what the last two digits are
=IF(A15>79,"FRI",IF(A15>59,"THU",IF(A15>39,"WED",IF(A15>19,"TUE", "MON")))) - this determines the day (A15 being the cell where the above formula is being stored at the moment)
=IF(MOD(A15,2), "1", "2") determines the week.
This determined then I have to make a timeslot for 4 different people.
What I need is some way of putting the above formulas into my userform so that when I input peoples data as required once I click on the submit button, it gives the next available timeslot to either person 1, 2, 3 or 4. This can be done automatically but I would prefer to select either 1, 2, 3 or 4 to even out the number of people each of my people see.
Or if there is another way of doing this, I am open to offers!! sensible ones of course.
Can anyone help please?????
Bookmarks