Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
After finding a specific cell how can I set borders for the entire row? For
instance: Cells.Find(What:="Totals", After:=ActiveCell, LookIn:=xlFormulas _ , LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).EntireRow.Activate I try to set up the borders for that entire row but it is not working. Help? -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200605/1 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi erikkeith
Record a macro when you do this en then look at the code -- Regards Ron de Bruin http://www.rondebruin.nl "erikkeith via OfficeKB.com" <u13156@uwe wrote in message news:5fe2a77d1e9b6@uwe... After finding a specific cell how can I set borders for the entire row? For instance: Cells.Find(What:="Totals", After:=ActiveCell, LookIn:=xlFormulas _ , LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).EntireRow.Activate I try to set up the borders for that entire row but it is not working. Help? -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200605/1 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You must not have understood my question. I want to be able to set up the
borders for cells A:O on the row that the "find" found what I was looking for. .....that being "Totals" Ron de Bruin wrote: Hi erikkeith Record a macro when you do this en then look at the code After finding a specific cell how can I set borders for the entire row? For instance: [quoted text clipped - 4 lines] I try to set up the borders for that entire row but it is not working. Help? -- Message posted via http://www.officekb.com |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You select the row with your code so if you record a macro you can add this to your code
Cells.Find(What:="Totals", After:=ActiveCell, LookIn:=xlFormulas _ , LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).EntireRow.Activate Selection.Borders(xlEdgeLeft).LineStyle = xlContinuous Selection.Borders(xlEdgeTop).LineStyle = xlContinuous Selection.Borders(xlEdgeBottom).LineStyle = xlContinuous Selection.Borders(xlEdgeRight).LineStyle = xlContinuous -- Regards Ron de Bruin http://www.rondebruin.nl "erikkeith via OfficeKB.com" <u13156@uwe wrote in message news:5fe3c2428134c@uwe... You must not have understood my question. I want to be able to set up the borders for cells A:O on the row that the "find" found what I was looking for. ....that being "Totals" Ron de Bruin wrote: Hi erikkeith Record a macro when you do this en then look at the code After finding a specific cell how can I set borders for the entire row? For instance: [quoted text clipped - 4 lines] I try to set up the borders for that entire row but it is not working. Help? -- Message posted via http://www.officekb.com |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yes, but how can I do it for just cells A through O? I find "Totals" on row
100 and then want cells adjust the borders for cells A:O for just that row. ? ???? Ron de Bruin wrote: You select the row with your code so if you record a macro you can add this to your code Cells.Find(What:="Totals", After:=ActiveCell, LookIn:=xlFormulas _ , LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).EntireRow.Activate Selection.Borders(xlEdgeLeft).LineStyle = xlContinuous Selection.Borders(xlEdgeTop).LineStyle = xlContinuous Selection.Borders(xlEdgeBottom).LineStyle = xlContinuous Selection.Borders(xlEdgeRight).LineStyle = xlContinuous You must not have understood my question. I want to be able to set up the borders for cells A:O on the row that the "find" found what I was looking for. [quoted text clipped - 9 lines] I try to set up the borders for that entire row but it is not working. Help? -- Message posted via http://www.officekb.com |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub test()
Dim rng As Range Set rng = Cells.Find(What:="Totals", After:=ActiveCell, LookIn:=xlFormulas _ , LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False) If Not rng Is Nothing Then With rng.Resize(1, 15) .Borders(xlEdgeLeft).LineStyle = xlContinuous .Borders(xlEdgeTop).LineStyle = xlContinuous .Borders(xlEdgeBottom).LineStyle = xlContinuous .Borders(xlEdgeRight).LineStyle = xlContinuous End With Else MsgBox "Nothing found" End If End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "erikkeith via OfficeKB.com" <u13156@uwe wrote in message news:5fe44c41489a1@uwe... Yes, but how can I do it for just cells A through O? I find "Totals" on row 100 and then want cells adjust the borders for cells A:O for just that row. ? ???? Ron de Bruin wrote: You select the row with your code so if you record a macro you can add this to your code Cells.Find(What:="Totals", After:=ActiveCell, LookIn:=xlFormulas _ , LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).EntireRow.Activate Selection.Borders(xlEdgeLeft).LineStyle = xlContinuous Selection.Borders(xlEdgeTop).LineStyle = xlContinuous Selection.Borders(xlEdgeBottom).LineStyle = xlContinuous Selection.Borders(xlEdgeRight).LineStyle = xlContinuous You must not have understood my question. I want to be able to set up the borders for cells A:O on the row that the "find" found what I was looking for. [quoted text clipped - 9 lines] I try to set up the borders for that entire row but it is not working. Help? -- Message posted via http://www.officekb.com |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You must not have understood my question. I want to be able to set up the
borders for cells A:O on the row that the "find" found what I was looking for. .....that being "Totals" Ron de Bruin wrote: Hi erikkeith Record a macro when you do this en then look at the code After finding a specific cell how can I set borders for the entire row? For instance: [quoted text clipped - 4 lines] I try to set up the borders for that entire row but it is not working. Help? -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200605/1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
border on last cell of page effects border on beginning cell of ne | Excel Discussion (Misc queries) | |||
border | Excel Worksheet Functions | |||
Border | Excel Discussion (Misc queries) | |||
Changing the border of one cell s/n change the border of adjacent | Excel Discussion (Misc queries) | |||
Border | Excel Worksheet Functions |