Multiple dates per row - to then index all dates with new rows based on the activity

lisaspencer

New Member
Joined
Jul 20, 2020
Messages
21
Office Version
  1. 365
Platform
  1. MacOS
Hi - I apologise in advance if this is a confusing one. I'm probably overcomplicating it myself but if someone is able to help, that would be amazing!

I have a chart of data with multiple dates and they all correspond with one another and will appear and reappear based on certain rules. Example, from a teacher's POV with marking. So column A displays the student name, column B displays the assignment name, column C displays the date it was set, column D displays the date it is due and etc etc.

My end goal is to turn this data into a calendar. I've found a template online that can convert a 2 column set of data into a calendar with the date on column A, and the event on Column B. So I'm trying to find a way to index all the dates in the first set of data and create an 'event' for each of those dates based on what the event is for. Example. 1st Jan - Keiras Assignment 1 was set, 2nd Jan - Keira's Assignment 2 was set. 3rd - Keira's Assignment 1 was submitted, 4th Jan - Keira's Assignment 3 was set, 5th Jan - Keira's Assignment 1 needs to be marked etc. So basically for every new date, a new row is produced which can then go into this calendar.

In my head, I thought the activity could be set like =E7&" "&F7&" "&ColumnTitleSET or DUE or SUBMITTED - based on the date that it is set for in said column

I think I need to find a way to separate the data based on the event rather than just data per row
But yes, if someone can help me get to the right direction that would be great

1676902392595.png
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Are you ok with VBA?
Also I would recommend to make a seperate column for status. It will make reporting easier in the future (ie making a Pivot Table)

In addition, is your sample data correct? "To be marked" date seems to be referring to 301?!
 
Upvote 0
I think this should work:
VBA Code:
Sub test()
  Dim myRange As Range, lRow As Long, i As Long
  lRow = Cells(Rows.Count, 4).End(xlUp).Row
  Set myRange = Range("I7:K" & lRow, "M2:M" & lRow)
  i = 7
  For Each Rng In myRange
    If Rng.Value <> "" Then
      Cells(i, 1).Value = Rng.Value
      Cells(i, 2).Value = Cells(Rng.Row, 5).Value & " " & Cells(Rng.Row, 6).Value
      Cells(i, 3).Value = Cells(6, Rng.Column).Value
      i = i + 1
    End If
  Next
End Sub
 
Upvote 1
Solution

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top