Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I had the following VBA that I use to format my reports:
Option Explicit Sub boldFillRangeIfCBoldOrBNull() Dim i As Integer For i = 1 To 1000 If Cells(i, "c").Font.Bold = True Then Range(Cells(i, "a"), Cells(i, "O")).Font.Bold = True Range(Cells(i, "a"), Cells(i, "O")).Interior.ColorIndex = 15 End If If Cells(i, "B") = "" Then Range(Cells(i, "A"), Cells(i, "O")).Interior.ColorIndex = 19 End If Next i Reporting need have changed and the range of data varies by customer. My spreadsheet could contain 5 rows or 5000 rows and the data may spread over col c or it could extend to col JJ. Can someone give me some idea as to how to get this to work on the existing data? Many Thanks in advance. End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Modify RDB's Copy filtered data code to loop through multiple shee | Excel Programming | |||
Copying Conditional Data Bar Format by Row to entire sheet | Excel Discussion (Misc queries) | |||
copying data from other worksheet including entire format | Excel Discussion (Misc queries) | |||
Modify to only work with nominated range instead of entire sheet | Excel Programming | |||
Modify a conditional format formula in code? | Excel Programming |