billandrew
Well-known Member
- Joined
- Mar 9, 2014
- Messages
- 743
Good evening
Is there a way to highlight min value in separate ranges.
I am utilizing some code provided from an earlier thread. Could I use the following repeated?
The code is
[TABLE="width: 70"]
<colgroup><col width="70" style="width:53pt"> </colgroup><tbody>[TR]
[TD="width: 70"]Sub FormatMin()[/TD]
[/TR]
[TR]
[TD] [/TD]
[/TR]
[TR]
[TD] Dim Col As Integer[/TD]
[/TR]
[TR]
[TD] Dim Row As Integer[/TD]
[/TR]
[TR]
[TD] Dim Row2 as Integer[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD] For Col = 1 To 11[/TD]
[/TR]
[TR]
[TD] For Row = 1 To 8[/TD]
[/TR]
[TR]
[TD]For Row2 = 9 to 18[/TD]
[/TR]
[TR]
[TD] [/TD]
[/TR]
[TR]
[TD] If Cells(Row, Col) = WorksheetFunction.Small(Columns(Col), 1) Then[/TD]
[/TR]
[TR]
[TD] [/TD]
[/TR]
[TR]
[TD] Cells(Row, Col).Font.Bold = True[/TD]
[/TR]
[TR]
[TD] End If[/TD]
[/TR]
[TR]
[TD] Next Row[/TD]
[/TR]
[TR]
[TD] Next Col[/TD]
[/TR]
[TR]
[TD="class: xl90"]Next Range[/TD]
[/TR]
[TR]
[TD]If cells(Row2,Col) =WorksheetFunction.Small(Columns(Col),1)Then[/TD]
[/TR]
[TR]
[TD]Cells(Row2,Col).Font.Bold = True[/TD]
[/TR]
[TR]
[TD]End If[/TD]
[/TR]
[TR]
[TD]Next Row2[/TD]
[/TR]
[TR]
[TD]Next Col[/TD]
[/TR]
[TR]
[TD]End Sub[/TD]
[/TR]
</tbody>[/TABLE]
Is there a way to highlight min value in separate ranges.
I am utilizing some code provided from an earlier thread. Could I use the following repeated?
The code is
[TABLE="width: 70"]
<colgroup><col width="70" style="width:53pt"> </colgroup><tbody>[TR]
[TD="width: 70"]Sub FormatMin()[/TD]
[/TR]
[TR]
[TD] [/TD]
[/TR]
[TR]
[TD] Dim Col As Integer[/TD]
[/TR]
[TR]
[TD] Dim Row As Integer[/TD]
[/TR]
[TR]
[TD] Dim Row2 as Integer[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD] For Col = 1 To 11[/TD]
[/TR]
[TR]
[TD] For Row = 1 To 8[/TD]
[/TR]
[TR]
[TD]For Row2 = 9 to 18[/TD]
[/TR]
[TR]
[TD] [/TD]
[/TR]
[TR]
[TD] If Cells(Row, Col) = WorksheetFunction.Small(Columns(Col), 1) Then[/TD]
[/TR]
[TR]
[TD] [/TD]
[/TR]
[TR]
[TD] Cells(Row, Col).Font.Bold = True[/TD]
[/TR]
[TR]
[TD] End If[/TD]
[/TR]
[TR]
[TD] Next Row[/TD]
[/TR]
[TR]
[TD] Next Col[/TD]
[/TR]
[TR]
[TD="class: xl90"]Next Range[/TD]
[/TR]
[TR]
[TD]If cells(Row2,Col) =WorksheetFunction.Small(Columns(Col),1)Then[/TD]
[/TR]
[TR]
[TD]Cells(Row2,Col).Font.Bold = True[/TD]
[/TR]
[TR]
[TD]End If[/TD]
[/TR]
[TR]
[TD]Next Row2[/TD]
[/TR]
[TR]
[TD]Next Col[/TD]
[/TR]
[TR]
[TD]End Sub[/TD]
[/TR]
</tbody>[/TABLE]