Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i'll chime in here and modify don's code, since you said it's what you want
Sub insertline() For Each c In Range("a2:a100") If UCase(c) = "TOTAL" Then With c.Resize(9).Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With End If Next c End Sub -- Gary "AirgasRob" wrote in message ... For example! Your code does exactly what I want except... I would like to select more than one cell in the same row. For example; The search finds the value "total" in A2. I then want it to select from A2:A10 and format the entire selection. Is that possible or is this an entirelly different beast? "Don Guillett" wrote: Example layout and cells desired -- Don Guillett Microsoft MVP Excel SalesAid Software "AirgasRob" wrote in message ... Thanks to Don Guillett I found the below code and it works great. But I need it to select more than one cell to format. Is it possible to modify the code to select several cells in the same row? Sub insertline() For Each c In Range("a2:a100") If UCase(c) = "TOTAL" Then With c.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With End If Next c End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Test on the format of a cell in a formula ? | New Users to Excel | |||
How can I test for colour format in if statements? | Excel Worksheet Functions | |||
Can one test for Excel cell format patterns? | Excel Programming | |||
Is there a logical test for a cell's format instead of contents | Excel Worksheet Functions | |||
Test a file to retrieve format | Excel Programming |