Professional Documents
Culture Documents
'Football matches'
Private Sub football_match_click()
Dim rng As range, matchname As String, counter As Integer, i As Integer, j As
Integer
Set rng = range("A1").CurrentRegion
counter = 0
Worksheets(1).Columns(2) = "" 'We empty column B(or2)
For i = 1 To rng.count
For j = i + 1 To rng.count
matchname = rng.Cells(i).Value & " vs " & rng.Cells(j).Value
Cells(counter + 1, 2).Value = matchname
counter = counter + 1
Next j
Next i
ActiveSheet.Columns(2).PrintPreview
End Sub
'For example if i Write Little House in the woods on the 16th line we will
set up now a font color for each cell
Private Sub fontsetup_click()
range("A16").Font.Color = vbRed
range("B16").Font.Color = RGB(0, 255, 0)
range("C16").Font.Bold = True
range("D16").Font.Italic = True
range("E16").Font.Underline = True
End Sub
End Sub
'2.Activate a cell of your choice, give a value, make the same to each cell
underneath,select the region and the numbers from the
'region