I am trying to build a work calendar where jobs can be input in specific day blocks. The calendar is oriented by row where the next day is in the next row down, and the jobs are put into the columns for those associated days. Columns O through V are set up for the jobs allocated to those days. I have some VBA set up to put the first job for that given day in column O, and I am looking for some code that will put the next job scheduled for that day in the next available column (in this case P), but not to exceed column V as I have more functions and information in columns W onwards. I have tried using
Dim lastcol As Long
Last col = Cells(wrkrow, Columns.Count).End(xlToLeft).Column
Where wrkrow is the row number for the day that the work is to be performed, and this gives me column O which has data in it as it is the first column that the job is put into, and I have tried it with xlToRight which gives me column W which already has data in it. I am so confused!
Dim lastcol As Long
Last col = Cells(wrkrow, Columns.Count).End(xlToLeft).Column
Where wrkrow is the row number for the day that the work is to be performed, and this gives me column O which has data in it as it is the first column that the job is put into, and I have tried it with xlToRight which gives me column W which already has data in it. I am so confused!