The following example uses a For Each...Next statement to iterate through each cell in a range named MyRange on Sheet1 of an active Microsoft Excel workbook. The variable c is a cell in the collection of cells contained in MyRange.

Sub ApplyFormat()
Const limit As Integer = 33
For Each c In I am having a liitle trouble with this program:
___________

Worksheets("Sheet1").Range("MyRange").Cells
If c.Value > limit Then
With c.Font
.Bold = True
.Italic = True
End With
End If
Next c
MsgBox "All done!"
End Sub
__________________

What I am trying to do is to change the contents of each cell in excel, but how do i declare each cell in a range so that i can loop through them.

This program does not work.