1/11
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
LastRow = Cells(Rows.Count, X).End(xlUp).Row
Look at column X in the spreadsheet, find the last row that has data in it, and that's your LastRow value

LastRow = Cells(Rows.Count, 1).End(xlUp).Row. What’s the last row that has data in the excel spreadsheet?
Row 11

Cells(Rows.Count, 1).End(xlUp).Row - 2
Subtract the difference of the last row that has data in it by 2. In this problem. Last row is 13, so you’d do 13-2= 11. Now the LastRow is 11. Loop will run from rows k=3 to k=11.

Cells (K,X)
X is telling you which column # you should look for.

After Loop is ran the 2nd time, the variable of tot_k will be…
Round | k (row) | Exam No (col 1) | Sick Days (col 4) | Condition (OR) | What gets added | tot_k |
|---|---|---|---|---|---|---|
1st | 3 | 1 | 10 | 1=6? No. 10=10? Yes → TRUE | Sick Days = 10 | 10 |
2nd | 4 | 2 | 10 | 2=6? No. 10=10? Yes → TRUE | Sick Days = 10 | 20 |

How to find the “Total Is” Column?
Cells(LastRow + 4, 2).Value = "The Total is."
Ans: ,2= Column B

What does the term “Not False” evaluate to?
It tells you what is True. “If Not” tells you it’s not false that 2<1. Hence the message box. “Today is Friday” will pop up!
In Cells(k, 4), what does k tell you?
K tells you where the row is.
When the loop says For k = 3 To LastRow, what row is k on during the 2nd loop?
Row 4 (starts at 3, increments by 1)
What is the default value of an Integer variable before anything is assigned to it?
Zero
If the condition uses And and one part is False, what happens?
Goes to Else — both must be True for Then to run
If the condition uses Or and only one part is True, what happens?
Runs Then — only one needs to be True