Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
If *Total* make row white
If *Total* in Column E, make row font white, Maybe this is what your after:
Sub FontColorForTotal() Dim lastrow As Long, j As Long On Error Resume Next lastrow = Cells(Rows.Count, 5).End(xlUp).Row For j = lastrow To 1 Step -1 If LCase(Cells(j, 5).Value) Like LCase("*Total*") Then Rows(j).Font.ColorIndex = 2 'white Else Rows(j).Font.ColorIndex = 1 'black End If Next End Sub HTH -- Data Hog "ryguy7272" wrote: I grabbed this from another macro that I have: Dim lastrow As Long, j As Long lastrow = Cells(Rows.Count, 5).End(xlUp).Row For j = lastrow To 1 Step -1 If (Cells(j, 5).Value) Like "*Total*" Then Rows(j).Interior.ColorIndex = xlNone End If Next Other macro worked great, but the way. I tried to white out each row, and now it doesn't work. Been looking at all kinds of code for about 10 hours now. My eyes need a rest. Can someone see the problem? Thanks! Ryan-- -- Ryan--- If this information was helpful, please indicate this by clicking ''Yes''. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Make row white unless the value of a certain cell is 0 | Excel Discussion (Misc queries) | |||
function to make a running total | Excel Discussion (Misc queries) | |||
How do I make a total sheet? | Charts and Charting in Excel | |||
EXCEL workbook is off-white, goes white in edit mode | Excel Discussion (Misc queries) | |||
Excel:I have15 #'s that total $65,000...which #'s make up $44,000 | Excel Worksheet Functions |