learning1984
New Member
- Joined
- Mar 2, 2016
- Messages
- 14
Morning guys,
I have a spreadsheet whereby the user completes user forms which populate a log, this all works fine. the user selects the date on the userform from a date picker calendar, what I want to happen is, the date gets imported to next available row column c. id like active row column d and e to contain a period ref and a week ref.
as well as working in dates, we also work in periods, 13 periods in a year, each one having 4 weeks, example, 17/03/2017 = period 7 week 1
in a separate sheet I have a list of all dates, and the corresponding period and week in the aligning columns,
if I was to put a vlookup in column d, it would look like this; =VLOOKUP(D(activerow),Data!BU2:BW510,2,FALSE)
I just cant seem to get this working in my vba. currently the date picker calander works, and places the date in datebox78, I then have TextBox79.value = ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-1],Data!R2C73:R510C75,2,FALSE)" but this isn't working
I have a spreadsheet whereby the user completes user forms which populate a log, this all works fine. the user selects the date on the userform from a date picker calendar, what I want to happen is, the date gets imported to next available row column c. id like active row column d and e to contain a period ref and a week ref.
as well as working in dates, we also work in periods, 13 periods in a year, each one having 4 weeks, example, 17/03/2017 = period 7 week 1
in a separate sheet I have a list of all dates, and the corresponding period and week in the aligning columns,
if I was to put a vlookup in column d, it would look like this; =VLOOKUP(D(activerow),Data!BU2:BW510,2,FALSE)
I just cant seem to get this working in my vba. currently the date picker calander works, and places the date in datebox78, I then have TextBox79.value = ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-1],Data!R2C73:R510C75,2,FALSE)" but this isn't working