Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub Macro1()
- '
- ' Macro1 Macro
- '
- '
- ' With Selection.Interior
- ' .Pattern = xlSolid
- ' .PatternColorIndex = xlAutomatic
- ' .ThemeColor = xlThemeColorDark1
- ' .TintAndShade = 0
- ' .PatternTintAndShade = 0
- ' End With
- ' With Selection.Font
- ' .ThemeColor = xlThemeColorLight1
- ' .TintAndShade = 0
- ' End With
- ' Range("C13").Select
- ' ActiveCell.FormulaR1C1 = "aget"
- ' Range("C12").Select
- Range("A1", "E5").Delete
- i = 1
- bcol = 500
- tcol = 1
- Do While i <= 300
- Range("A1", "E5").Select
- If i <= 100 Then
- Range("A1", "E5").value = "hmm"
- ElseIf i > 100 And i <= 200 Then
- Range("A1", "E5").value = "Hi how are you"
- ElseIf i > 200 Then
- Range("A1", "E5").value = "ending"
- End If
- Range("A1", "E5").EntireColumn.AutoFit
- 'Columns("A:A").EntireColumn.AutoFit
- 'Columns("B:B").EntireColumn.AutoFit
- 'Columns("C:C").EntireColumn.AutoFit
- 'Columns("D:D").EntireColumn.AutoFit
- 'Columns("E:E").EntireColumn.AutoFit
- With Selection.Interior
- .Color = bcol
- End With
- With Selection.Font
- .Color = tcol
- End With
- bcol = bcol + 1
- tcol = tcol + 1
- i = i + 1
- Loop
- Range("A1", "E5").Delete
- Range("A1").value = "Loop Executed:"
- Range("B1").value = i
- Range("C1").value = "times."
- Range("A2").value = "Author:"
- Range("B2").value = "Joshua C"
- Range("A3").Select
- ActiveCell.FormulaR1C1 = "=DATE(2010,10,31)"
- Range("B3").Select
- ActiveCell.FormulaR1C1 = "=TIME(20,28,0)"
- Range("A1", "Z1").EntireColumn.AutoFit
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement