LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Find text in a cell and select whole row question


Ok,
so what I am trying to do is find some text in a cell (I know the text
represents the end of a list in a row of text) and then select the row
from A:F and then format the selected cells with a line on the bottom.
I have gotten it to run when recording a macro BUT when I apply to
other sheets it does not format the way it should.
This is the initial starting code but I want to loop this with the row
range also added.
All help appreciated
Patrick

Sub Sheet_Format()
Cells.Find(What:="ATM CARDS", After:=ActiveCell,
LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByColumns,
SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
Rows("7:7").Select
Range("B7").Activate
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
With Selection.Borders(xlEdgeTop)
LineStyle = xlContinuous
Weight = xlThin
ColorIndex = xlAutomatic
End With
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.FindNext(After:=ActiveCell).Activate
Selection.FindNext(After:=ActiveCell).Activate
Range("B7").Select
Cells.FindNext(After:=ActiveCell).Activate
Range("A8").Select
End Sub


--
crowdx42
------------------------------------------------------------------------
crowdx42's Profile: http://www.excelforum.com/member.php...o&userid=37749
View this thread: http://www.excelforum.com/showthread...hreadid=573340

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find text String and select cell address where it is found? JCIrish Excel Programming 5 April 16th 06 02:38 PM
Use Select / Case to find certain text marlea[_10_] Excel Programming 4 February 2nd 06 12:05 PM
Simple Question: Select Text Box from Spreadsheet? Lost![_3_] Excel Programming 4 June 8th 05 12:41 PM
Find cell select row and delete Rich[_20_] Excel Programming 3 February 1st 04 03:06 PM
Find a certain word in excel and select the cell desmondleow[_8_] Excel Programming 3 December 18th 03 02:39 PM


All times are GMT +1. The time now is 02:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"