Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
early beginner not satisfied with simple macro
Hi,
Although this macro works, is there a way to improve it ? ===start=== Option Explicit Sub FormatHighestValue() Dim c as Rang Dim iEndRow as Integer Dim iEndCol as String iEndCol = ThisWorkbook.Sheets(1).Range("B2").End(xlToRight). Address iEndRow = ThisWorbook.Sheets(1).Range("B2").End(xlDown).Row iEndCol = Left(iEndCol, 2) iEndCol = Right (iEndCol, 1) ThisWorkbook.Range("B2" & ":" & iEndCol & iEndRow).Select For Each c in Selection.Cells If c.Value 1000 Then c.Font.ColorIndex = 3 End If next c End Sub ===end=== I think code about iEndCol could be reduced... Thanks in advance for your help. Ppp |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Simple problem, must be too early... | Excel Programming | |||
My guess it's a simple quesion, but I'm a beginner | Excel Programming | |||
Simple beginner question | Excel Programming | |||
Simple beginner question | Excel Programming | |||
Simple beginner question | Excel Programming |