Solutions to the other 3 exercises:
Note: randomInteger() should be
randomInteger() in Solution to Question #4:
+ lowInteger (PLUS not MINUS, + not -)
---- -----
theRandomNum = Int(Rnd * howManyIntegers + lowInteger
as was explained and corrected in class on 09/27/2011
VIP: EXCEL
VBA SOLUTIONS - learn the syntax and semantics VBA basics.
Do NOT look at the solutions until after you have tried to answer all the questions is the best strategy if you want to LEARN it anyway, btw.
This is your brain before taking notes while reading, studying or sitting in a class. This is your brain after taking notes. See the HUGE difference? Compare to this is brain before the lecture and this is brain after the lecture where you did NOT take notes. Very little discernable difference. Very little intellectual growth. BICTION. If the ink don't flow, the understanding don't grow.
Sub updateCounts() hadRepeat = False For r = 3 to 24 If Cells(r, 2).Value = "Repeat" Then hadRepeat = True End If Next r If hadRepeat = True Then Range("F2").Value = Range("F2").Value + 1 End If Range("G2").Value = Range("G2").Value + 1 End Sub
Using Microsoft Internet Explorer web browser, review the following Microsoft PowerPoint web published tutorial on doing an Excel VBA macro program to assess the 23 birthdays problem. Note: DOES NOT WORK with most web browsers. You need to use Windows Internet Explorer browser.