Get rows from a named range (name the range before running this cript) : Range Loop « Excel « VBA / Excel / Access / Word






Get rows from a named range (name the range before running this cript)

 
Sub Bold()
   Dim rngRow As Range
   For Each rngRow In Range("yourRange").Rows
      If rngRow.Cells(1).Value > 1 Then
         rngRow.Font.Bold = True
      Else
         rngRow.Font.Bold = False
      End If
   Next rngRow
End Sub

 








Related examples in the same category

1.For Each Loops for a range
2.Loop through a range cell by cell
3.Set the value in a range by cell index
4.Loop through all cells in a range
5.Get Rows from a range