Needa Help on the VBA for an Attendance Sheet

Attendance ListSummary
Hi!

I need to create a new routine so that it will highlight in the "Summary" in
i)      red for courses that the staff has not attended after the deadline has passed, and
ii)      yellow for courses that the staff has attended but only after the deadline has passed.

This has to be based on the "Attendance List"

Any help is much appreciated!! :)
Zhen YangAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Roy CoxGroup Finance ManagerCommented:
Why VBA, this can be done with Conditional Formatting.

Attach an example workbook
0
Zhen YangAuthor Commented:
Staff_list.xlsm

Hi!

Here is the example workbook. I am a student and I have to create a VBA for this assignment.

Perhaps, you can help me record a Macro while you using the Conditional Formating? :)
0
Martin LissOlder than dirtCommented:
You forgot to click the Upload button.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Zhen YangAuthor Commented:
Is is uploaded here now?
Staff_list.xlsm
0
Zhen YangAuthor Commented:
Yes, I understand! It's actually like the last part of my assignment!

I just need a sample VBA routine so that I can understand what needs to be done and I would create a new VBA on my own based on what I have learned :)
0
Zhen YangAuthor Commented:
This is my VBA so far. Though, nothing happens when I click run.

Dim Staff As Integer
Dim rowNum As Integer

For rowNum = 2 To 101
For Staff = A2 To A101

If Sheets("Attendance List").Range("A" & rowNum).Value = Staff And _
Sheets("Attendance List").Range("B" & rowNum).Value = Range("C" & rowNum).Value Then
Range("C" & rowNum).Interior.ColorIndex = 0



End If

Next
Next

End Sub
0
Martin LissOlder than dirtCommented:
When you do this

If Sheets("Attendance List").Range("A" & rowNum).Value = Staff And _
Sheets("Attendance List").Range("B" & rowNum).Value = Range("C" & rowNum).Value Then

Open in new window


You are comparing the value in a cell on the Attendance List sheet (which is a name) with a Staff which is simply an Integer so there can't be a match, so change Staff to refer to a cell on the Summary sheet and see what happens.
0
Zhen YangAuthor Commented:
I have tried changing this part:

For Staff = Sheets("Summary").Range("A")

It is red right now, how should change it? :)
0
Martin LissOlder than dirtCommented:
Also, I don't know if your instructor talked about it, but rather than hard-coding 102 as the last row number, there are several sways of calculating it. one way is this.

Dim lngLastRow as Long ' Use long instead of integer because the latter
                                            ' limited to 32765 (and yes there can be more than
                                            ' that) and Long isn't. Long is also faster.

lngLastRow = Sheets("Attendance List").Range("A1048576").End(xlUp).Row

Open in new window

0
Martin LissOlder than dirtCommented:
Don't change the For loop but rather change the first part of the line from

If Sheets("Attendance List").Range("A" & rowNum).Value = Staff And...

to

If Sheets("Attendance List").Range("A" & rowNum).Value = Range("A" & Staff)  And...
0
Martin LissOlder than dirtCommented:
You are going to run into a problem however and that is that there are 124 rows on the Attendance list and only 101 on the Summary, and since you are comparing row 1 to row 1 and row 2 to row 2, etcetera, you will never look at the last 13 rows on the Attendance sheet. What are you going to do about that?
0
Zhen YangAuthor Commented:
If Sheets("Attendance List").Range("A" & rowNum).Value = Range("A" & Staff) And _
Sheets("Attendance List").Range("B" & rowNum).Value = Range("C" & rowNum).Value Then
Range("C" & rowNum).Interior.ColorIndex = 0

This is the new code, it turns everything in the range Red that this part:
If Sheets("Attendance List").Range("A" & rowNum).Value = Range("A" & Staff) And _
Sheets("Attendance List").Range("B" & rowNum).Value = Range("C" & rowNum).Value Then

is highlighted in yellow
0
Martin LissOlder than dirtCommented:
Before I do anything more for you, think about the problem I mentioned and tell me if you have any ideas about how to corret it.
0
Zhen YangAuthor Commented:
I was thinking about a code that would directly compare the names.. but I don't know how to start
0
Martin LissOlder than dirtCommented:
One way to do it would be to read the first row in the Summary sheet and then read through every row in the Attendance sheet until you find a match. If there is no match then read the second row, and compare it to every row in in the Attendance sheet, and repeat laboriously until a match is found. While it will work, it is the wrong way to do it.

The right way is to use "Find". I leave it to the student to find out how to use Find:)
0
Zhen YangAuthor Commented:
I think to solve it, I need to create a code to compare the value of the Names in the Attendance List that match the Names in the Summary? Is that correct?
0
Martin LissOlder than dirtCommented:
Well yes, that is what you are doing, but as I said with your current code you aren't looking at the last 13 rows on the Attendance sheet, and also more importantly, your code assumes that the name on row 1 matches the name on row 1 and the name on row 2 matches the name on row 2, etc. and that's not the case.
0
Zhen YangAuthor Commented:
Hmm... How about if I create another loop or edit my "Staff"?
0
Zhen YangAuthor Commented:
Oh I found a Range.Find code.. Is this the correct function I should be using?
0
Martin LissOlder than dirtCommented:
The second loop I described as the "wrong way" will work (if you do it right), but it will be slower than necessary. Did your instructor or your source materials talk about "Find"?
0
Zhen YangAuthor Commented:
I have not been taught about that function.. I do not have any resource materials either...

I tried putting the Find Function into it

If Sheets("Attendance List").Range("A" & rowNum).Value = Range.Find("A" & Staff) And _
Sheets("Attendance List").Range("B" & rowNum).Value = Range.Find("C" & rowNum).Value Then
Range("C" & rowNum).Interior.ColorIn

But it states that  "Argument not optional"
0
Martin LissOlder than dirtCommented:
Is this the correct function I should be using?
Yes. Take a look at this site.
0
Martin LissOlder than dirtCommented:
If you think that Find is too complicated for you at this point then give the double loop a try,
0
Zhen YangAuthor Commented:
I think I may have made a mistake while trying to double loop. I am no so sure what I did wrong....

Sub ESE()

Range("C:E").Interior.ColorIndex = 3
Range("C1:E1").Interior.ColorIndex = 0
Range("C102:E1000").Interior.ColorIndex = 0

Dim Staff As Integer
Dim rowNum As Integer
Dim colNum As Integer

For rowNum = 2 To 101
For Staff = A2 To 101
For colNum = 2 To 124
If Sheets("Attendance List").Range(colNum & rowNum).Value = Range("A" & Staff) And _
Sheets("Attendance List").Range(B & rowNum).Value = Range("C" & rowNum).Value Then
Range("C" & rowNum).Interior.ColorIndex = 0



End If

Next
Next
Next

End Sub


This part is highlighted in yellow:

If Sheets("Attendance List").Range(colNum & rowNum).Value = Range("A" & Staff) And _
Sheets("Attendance List").Range(B & rowNum).Value = Range("C" & rowNum).Value Then
0
Martin LissOlder than dirtCommented:
In the IDE, go to the 'Debug' menu and click 'Compile VBAProject'. It will point out a mistake that you made.

After you correct that mistake, compile again and it will point out a second mistake.

Then when you run the code you'll get an error on the 'If...' line. It may be hard for you to figure out what's wrong, so I'll tell you how to find out. The error will cause the code to stop at that line and turn it yellow. While it is, select colNum & rowNum with the cursor and you will see '22' which is what those things resolve to. BTW, you will also see '22' if you select that code and the click the 'eyeglasses' in the toolbar. In any case since those two values resolve to '22', what the code sees is Range(22) and I'm sure you know that that's not valid. To fix it use 'Cell' rather than 'Range'. With 'Cell' you enter two values, the first one for the row and the second one for the column. So instead if Range(colNum & rowNum), do Cells(rowNum, ColNum). Note that the two values are separated by a comma.

Once that's out of the way please do this before you run the code. Click in the margin to the left of the 'If...' line (pointed out by the arrow in my picture). That will leave a red dot which is called a breakpoint, which means that the code will stop and wait for you to do something when the code gets there. In this case what you should do is to highlight Sheets("Attendance List").Cells(rowNum, colNum).Value part and use the techniques I described above to see what the value is, and the highlight the Range("A" & Staff) part. Do you see the problem? When you are done with the breakpoint, click it and it will go away.

Before:
2018-04-28_09-21-36.png
After:
2018-04-28_09-35-54.pngYou see two red dots because it's all the same line.

BTW look how I indented the code to make it easier to read and understand what's going on.
0
Zhen YangAuthor Commented:
I managed to make something that works and there is only one problem left.  Some of the Column E boxes are highlighted in red even though they contain no content. They should be in White. Do you mind checking the code below :)

Sub Macro5()
'
' Macro5 Macro
'

'
    Cells.FormatConditions.Delete
    Range("C2:E101").Select
    Range("E12").Activate
    Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
        "=LEN(TRIM(E12))=0"
    Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
    Selection.FormatConditions(1).StopIfTrue = True
    Range("C2:E101").Select
    Range("E12").Activate
    Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
        "=COUNTIFS('Attendance list'!$A$2:$A$124,$A2,'Attendance list'!$B$2:$B$124,C2,'Attendance list'!$C$2:$C$124,"">""&$F2)>0"
    Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
    With Selection.FormatConditions(1).Interior
        .PatternColorIndex = xlAutomatic
        .Color = 65535
        .TintAndShade = 0
    End With
   

   
    Selection.FormatConditions(1).StopIfTrue = True
    Range("C2:E101").Select
    Range("E12").Activate
    Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
        "=AND(COUNTIFS('Attendance list'!$A$2:$A$124,$A2,'Attendance list'!$B$2:$B$124,C2)=0,$F2<TODAY())"
    Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
    With Selection.FormatConditions(1).Interior
        .PatternColorIndex = xlAutomatic
        .Color = 255
        .TintAndShade = 0
    End With
    Selection.FormatConditions(1).StopIfTrue = False
    ActiveWindow.SmallScroll Down:=51
   
   

End Sub
help.JPG
0
Martin LissOlder than dirtCommented:
My posts above were my attempt to teach you some new techniques. Were there some things in them that you don't understand?
0
Zhen YangAuthor Commented:
Sorry! I was trying your method at the same time andI managed to try doing something with what you are trying to teach me. However, it does not work like I want it to :(
I have attached a file with the Macro inserted
Staff_list--3-.xlsm
0
Martin LissOlder than dirtCommented:
You've come a long way. Congratulations! Try this which I believe will work once you add the code to color the cells. If you use my code you will probably have to demonstrate to your teacher that you know what it is doing, so if you have any questions let me know. By the way, when you post code here, select the code like I did in the picture at the bottom and click the 'CODE' button. It makes the code easier to read.

Sub RedYellow()
Dim lngLastRowS As Long
Dim lngLastRowA As Long
Dim lngRowS As Long
Dim lngRowA As Long
Dim wsAttend As Worksheet

Set wsAttend = Sheets("Attendance list")
Sheets("Summary").Activate
lngLastRowS = Range("A1048576").End(xlUp).Row
lngLastRowA = wsAttend.Range("A1048576").End(xlUp).Row

For lngRowS = 2 To lngLastRowS
    For lngRowA = 2 To lngLastRowA
        If Cells(lngRowS, "A") = wsAttend.Cells(lngRowA, "A") Then
                Debug.Print "S" & lngRowS & " " & Cells(lngRowS, "A") & " matches A" & lngRowA
            If Cells(lngRowS, "C") = wsAttend.Cells(lngRowA, "B") Then
                ' Compare dates and color column "C"
                Debug.Print "    B matches C"
                lngRowA = lngRowA + 1
            End If
            If Cells(lngRowS, "D") = wsAttend.Cells(lngRowA, "B") Then
                ' Compare dates and color column "D"
                Debug.Print "    B matches D"
                lngRowA = lngRowA + 1
            End If
            If Cells(lngRowS, "E") = wsAttend.Cells(lngRowA, "B") Then
                ' Compare dates and color column "E"
                Debug.Print "    B matches E"
                lngRowA = lngRowA + 1
            End If
            If Cells(lngRowS, "A") = wsAttend.Cells(lngRowA + 1, "A") Then
                Exit For
            End If
        End If
    Next
Next
End Sub

Open in new window

2018-04-29_18-54-41.png
0
Martin LissOlder than dirtCommented:
In my previous post I should have said "...once you add the code to compare dates and to color the cells....
0
Zhen YangAuthor Commented:
Hi! Thanks so much! There is one problem thoughhelp.JPG
Some of the Cells in Column E which should be left in White Color are coloured
0
Zhen YangAuthor Commented:
These cells that should be left White are empty, that's why :)
0
Martin LissOlder than dirtCommented:
Please attach the workbook that produced the results in your picture.
0
Zhen YangAuthor Commented:
Hi! I found another way to do it
Sub Summary()

Dim rowNum As Integer
For rowNum = 2 To 101
    
    Range("A" & rowNum).Value = Sheets("Staff Name List").Range("A" & rowNum).Value
    Range("B" & rowNum).Value = Sheets("Staff Name List").Range("B" & rowNum).Value
    Range("C" & rowNum).Value = "Customer service"
    Range("D" & rowNum).Value = "Dealing with difficult people"
    
    If Sheets("Staff Name List").Range("D" & rowNum).Value = "Quality control" Then
        Range("E" & rowNum).Value = "Six Sigma Jumpstart Training"
    End If
    
    If Sheets("Staff Name List").Range("D" & rowNum).Value = "Sales and marketing" Then
        Range("E" & rowNum).Value = "Digital and social media marketing strategies"
    End If
    
    If Sheets("Staff Name List").Range("D" & rowNum).Value = "Production" Then
        Range("E" & rowNum).Value = "Workplace Safety and Health (Level 1)"
    End If
    
 Range("F" & rowNum).Value = DateAdd("yyyy", 3, CDate(Range("B" & rowNum)))

Next

End Sub


Sub checkAttendance()

Dim sWs As Worksheet
Dim aWs As Worksheet
Set sWs = Worksheets("Summary")
Set aWs = Worksheets("Attendance list")
Dim columnNo As Byte

Dim NoNames As Long
Dim c As Long

Dim coursDate As Date

With sWs

'counts number of names
NoNames = .Cells(50000, 1).End(xlUp).Row - 1

'looping through column 3 to 5 (step 1)
For columnNo = 3 To 5 Step 1

'clean previous highlights to start from scratch
.Range(.Cells(2, columnNo), .Cells(NoNames + 1, columnNo)).Interior.Color = xlNone

'going through each name
For c = 1 To NoNames

' ignore cells without course name
If Trim(.Cells(c + 1, columnNo)) <> "" Then

' checking whether name exist in attendance sheet
If Application.WorksheetFunction.CountIfs(aWs.Columns(1), .Cells(c + 1, 1).Value) = 0 Then

.Cells(c + 1, columnNo).Interior.ColorIndex = 3

Else


'taking data from attendance list
coursDate = Application.WorksheetFunction.SumIfs(aWs.Columns(3), aWs.Columns(1), .Cells(c + 1, 1).Value, aWs.Columns(2), .Cells(c + 1, columnNo).Value)

' apply cells colours according to the guidelines
If coursDate > CDate(.Cells(c + 1, 6)) Then
.Cells(c + 1, columnNo).Interior.ColorIndex = 6
ElseIf coursDate = 0 Then
.Cells(c + 1, columnNo).Interior.ColorIndex = 3
End If
End If
End If
Next c
Next columnNo


End With

End Sub

Open in new window

0
Zhen YangAuthor Commented:
Anyway, can you tell me how to complete the code you gave me.. I am not sure where to even put the code that will color the cells
0
Martin LissOlder than dirtCommented:
I actually avoided doing the coloring because I'm not sure I understand what should be red and what should be yellow. This makes a course red if a person has attended a course after the deadline. Please make sure that it is correct. If it is then you can probably figure out the code to make some courses yellow. I also added some documentation to help you understand what's going on.

Sub RedYellow()
Dim lngLastRowS As Long
Dim lngLastRowA As Long
Dim lngRowS As Long
Dim lngRowA As Long
Dim wsAttend As Worksheet

Set wsAttend = Sheets("Attendance list")
Sheets("Summary").Activate
lngLastRowS = Range("A1048576").End(xlUp).Row
lngLastRowA = wsAttend.Range("A1048576").End(xlUp).Row

For lngRowS = 2 To lngLastRowS
    For lngRowA = 2 To lngLastRowA
        If Cells(lngRowS, "A") = wsAttend.Cells(lngRowA, "A") Then
            ' A name on the Summary sheet matches a name on the Attendance sheet,
            ' so compare the course in column B, first with column C  on the Summary sheet
            If wsAttend.Cells(lngRowA, "B") = Cells(lngRowS, "C") Then
                ' It matches so compare the deadline in column F of the Summary sheet
                ' against the Date Completed in column C of the Attendance List.
                If DateDiff("D", wsAttend.Cells(lngRowA, "C"), Cells(lngRowS, "F")) < 0 Then
                    Cells(lngRowS, "C").Interior.Color = 255
                End If
                ' Look at the next course for the
                lngRowA = lngRowA + 1
            End If
            
            If Cells(lngRowS, "A") = wsAttend.Cells(lngRowA + 1, "A") Then
                ' The Name has changed so stop comparing courses
                Exit For
            End If
            ' Now compare column B with column D
            If wsAttend.Cells(lngRowA, "B") = Cells(lngRowS, "D") Then
                If DateDiff("D", wsAttend.Cells(lngRowA, "C"), Cells(lngRowS, "F")) < 0 Then
                    Cells(lngRowS, "D").Interior.Color = 255
                End If
                lngRowA = lngRowA + 1
            End If
            
            If Cells(lngRowS, "A") = wsAttend.Cells(lngRowA + 1, "A") Then
                ' The Name has changed so stop comparing courses
                Exit For
            End If
            ' Finally compare column B with column E
            If wsAttend.Cells(lngRowA, "B") = Cells(lngRowS, "E") Then
                If DateDiff("D", wsAttend.Cells(lngRowA, "C"), Cells(lngRowS, "F")) < 0 Then
                    Cells(lngRowS, "E").Interior.Color = 255
                End If
            End If
        End If
    Next
Next
End Sub

Open in new window

0
Zhen YangAuthor Commented:
It should be:

i)      red for courses that the staff has not attended after the deadline has passed (Which means it is highlighted in Red because they did not attend the course at all)
ii)      yellow for courses that the staff has attended but only after the deadline has passed(Which means they attended the course and it is found in the attendance list but they only attend after the deadline in the summary)
iii) white for courses they have attended(in the attendance list) and before the deadline(in the summary)
0
Martin LissOlder than dirtCommented:
OK, try this. I used Find. See my comments at the top of the code. If you find a result on the Summary sheet that you don't agree with, give me the cell address and the color you think it should be.
29096850b.xlsm
0
Zhen YangAuthor Commented:
I agree with all the results. However there is only one problem, some of the column E cells are highlighted in red even though they are empty. They should be left White because they are empty.

help.JPG
0
Martin LissOlder than dirtCommented:
Sub RedYellow()
' This macro looks at attendance of a person at three courses. When
' considering attendance there are three possible situations:
' 1) They didn't attend
' 2) They attended on or before the deadline
' 3) They attended after the deadline
' For situation 1, color the blank column(s) on the Summary sheet red.
' For situation 2, don't do anything.
' For situation 3, color the course(s) yellow.

Dim lngLastRow As Long
Dim lngRow As Long
Dim wsAttend As Worksheet
Dim wsSummary As Worksheet
Dim strName As String
Dim bAttendC1 As Boolean
Dim bAttendC2 As Boolean
Dim bAttendC3 As Boolean
Dim rngName As Range
Dim cel As Range

Set wsAttend = Sheets("Attendance list")
Set wsSummary = Sheets("Summary")
lngLastRow = wsAttend.Range("A1048576").End(xlUp).Row
strName = Trim(wsAttend.Range("A2"))

' Clear the colors from any previous run
With wsSummary.Columns("C:E").Interior
    .Pattern = xlNone
    .TintAndShade = 0
    .PatternTintAndShade = 0
End With

For lngRow = 2 To lngLastRow + 1 ' Loop to the row AFTER the last row so that
                                 ' we can process the data IN the last row
    If Trim(wsAttend.Cells(lngRow, "A")) <> strName Then
        ' It's a different name so highlight in red
        ' that the previous name didn't take
        Set rngName = wsSummary.Columns("A").Find(What:=strName, MatchCase:=False)
        If Not rngName Is Nothing Then
            ' Interior.ColorIndex 3 is red
            If Not bAttendC1 And Not IsEmpty(wsSummary.Cells(rngName.Row, "C")) Then
                wsSummary.Cells(rngName.Row, "C").Interior.ColorIndex = 3
            End If
            If Not bAttendC2 And Not IsEmpty(wsSummary.Cells(rngName.Row, "D")) Then
                wsSummary.Cells(rngName.Row, "D").Interior.ColorIndex = 3
            End If
            If Not bAttendC3 And Not IsEmpty(wsSummary.Cells(rngName.Row, "E")) Then
                wsSummary.Cells(rngName.Row, "E").Interior.ColorIndex = 3
            End If
            strName = Trim(wsAttend.Cells(lngRow, "A"))
        Else
            ' Name not found!
            MsgBox "Name " & strName & " not found in the Summary sheet!", , "Error"
            Exit Sub
        End If
        ' Reset the flags for the new name
        bAttendC1 = False
        bAttendC2 = False
        bAttendC3 = False
        ' Back up a row so that the we can examine the first row for this name
        lngRow = lngRow - 1
    Else
        Set rngName = wsSummary.Columns("A").Find(What:=strName, MatchCase:=False)
        If Not rngName Is Nothing Then
            If wsAttend.Cells(lngRow, "B") = wsSummary.Cells(rngName.Row, "C") Then
                bAttendC1 = True
                If DateDiff("D", wsAttend.Cells(lngRow, "C"), wsSummary.Cells(rngName.Row, "F")) < 0 Then
                    ' Interior.ColorIndex 6 is yellow
                    wsSummary.Cells(rngName.Row, "C").Interior.ColorIndex = 6
                End If
            End If
            If wsAttend.Cells(lngRow, "B") = wsSummary.Cells(rngName.Row, "D") Then
                bAttendC2 = True
                If DateDiff("D", wsAttend.Cells(lngRow, "C"), wsSummary.Cells(rngName.Row, "F")) < 0 Then
                    wsSummary.Cells(rngName.Row, "D").Interior.ColorIndex = 6
                End If
            End If
            If wsAttend.Cells(lngRow, "B") = wsSummary.Cells(rngName.Row, "E") Then
                bAttendC3 = True
                If DateDiff("D", wsAttend.Cells(lngRow, "C"), wsSummary.Cells(rngName.Row, "F")) < 0 Then
                    wsSummary.Cells(rngName.Row, "E").Interior.ColorIndex = 6
                End If
            End If
        End If
    End If
Next

' Now find the people who have been really naughty and haven't
' attended any classes.
With wsSummary
    lngLastRow = .Range("A1048576").End(xlUp).Row

    For lngRow = 2 To lngLastRow
        Set rngName = wsAttend.Columns("A").Find(What:=Trim(.Cells(lngRow, "A")), MatchCase:=False)
        If rngName Is Nothing Then
            For Each cel In .Range("C" & lngRow & ":E" & lngRow)
                If Not IsEmpty(cel) Then
                    cel.Interior.ColorIndex = 3
                End If
            Next
        End If
    Next
End With

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Zhen YangAuthor Commented:
It works perfectly now! Thanks for all of your help!! :)
0
Martin LissOlder than dirtCommented:
Please don't forget to close this question. Here's how to do it.

In any case you’re welcome and I’m glad I was able to help.

If you expand the “Full Biography” section of my profile you’ll find links to some articles I’ve written that may interest you.

Marty - Microsoft MVP 2009 to 2017
              Experts Exchange Most Valuable Expert (MVE) 2015, 2017
              Experts Exchange Top Expert Visual Basic Classic 2012 to 2017
              Experts Exchange Top Expert VBA (current)
0
Martin LissOlder than dirtCommented:
If you are interested in keeping the documentation correct then change line 7 from

' For situation 1, color the blank column(s) on the Summary sheet red.

to

' For situation 1, color the unattended courses on the Summary sheet red.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VBA

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.