![]() |
Border help
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 |
Border help
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 |
Border help
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 |
Border help
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 |
Border help
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 |
Border help
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 |
Border help
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 |
Border help
Thanks! That worked
Ron de Bruin wrote: 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 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. ? [quoted text clipped - 16 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 |
Border help
Change cells.find to Columns("A").find to be sure it only look in A
-- Regards Ron de Bruin http://www.rondebruin.nl "erikkeith via OfficeKB.com" <u13156@uwe wrote in message news:5fe49d45e96e9@uwe... Thanks! That worked Ron de Bruin wrote: 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 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. ? [quoted text clipped - 16 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 |
All times are GMT +1. The time now is 06:50 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com