Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
guideme
 
Posts: n/a
Default How do I start a search

everytime a open a certain spreadsheet?
I would like to search if several particular account numbers are on a
certain worksheet and then highlight it with yellow then until the whole
worksheet has been searched.
Now everytime a get a new spreadsheet, I need to do this search first to
alert me.

thanks a bunch.
  #2   Report Post  
JMB
 
Posts: n/a
Default

If you only have a few account numbers you're looking for and they don't
change very often - it would be easiest to use conditional formatting.
Select all of the cells on the worksheet then go to format/conditional
formatting and set up your criteria (you have to set up a criterial for each
account number you're looking for). Of course, you would have to do this for
each worksheet you want evaluated.

An alternative is to set up a macro in your Personal Macro Library, which
may be a better route if you have a number of account numbers or you have
multiple worksheets/workbooks you need to review. Go into the Visual Basic
Editor (Alt F11) and paste the code at the bottom into any module of the
Personal Macro Workbook.

Then, switch back to Excel, unhide Personal.XLS (Windows/unhide) and enter
your account numbers in the first column of the first sheet (this is where
the macro assumes the account numbers will be). Then you can access the
macro through Tools/Macro/Macros (or Alt F8) and it will analyze the active
sheet for your account numbers. If you need to change your listing of
account numbers, you can unhide Personal.XLS and edit your list.

Sub FindAccounts()
On Error Resume Next
For Each x In ActiveSheet.UsedRange.Cells
If Not IsError(Application.VLookup(x.Value, _
ThisWorkbook.Sheets(1).Columns(1), 1, False)) Then
x.Interior.ColorIndex = 6
End If
Next x

End Sub



"guideme" wrote:

everytime a open a certain spreadsheet?
I would like to search if several particular account numbers are on a
certain worksheet and then highlight it with yellow then until the whole
worksheet has been searched.
Now everytime a get a new spreadsheet, I need to do this search first to
alert me.

thanks a bunch.

Reply
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 project start and end dates in a DB with many different proje AceWriter01 Excel Worksheet Functions 3 April 1st 05 03:58 AM
FAQ Spreadsheet with search function murphyz Excel Discussion (Misc queries) 0 March 19th 05 09:24 PM
Search problems BigPig Excel Worksheet Functions 0 December 29th 04 08:11 PM
Lookup with search range start based on position of last blank lin rcmodelr Excel Worksheet Functions 0 November 14th 04 06:32 AM
Inserting Blank Rows Macro? Michael Saffer Excel Worksheet Functions 2 November 9th 04 06:23 PM


All times are GMT +1. The time now is 04:39 AM.

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

About Us

"It's about Microsoft Excel"