how to change default option for search

  • Thread starter Thread starter AL
  • Start date Start date
A

AL

When I load excel, it always searches by rows. How can I
set it up to search by column by default?
 
I don't think you can change the default, but since excel likes to remember the
last thing you did, you can take advantage of it.

Start a new workbook and record a macro that does a Find the way you want.

Then name that macro: Auto_Open
and right near the last line, add this: thisworkbook.close savechanges:=false

Here's the format (but don't trust the settings--use your favorites!):

Option Explicit
Sub auto_open()

Worksheets("sheet1").Cells.Find What:="", After:=ActiveCell, _
LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByColumns, _
SearchDirection:=xlNext, MatchCase:=False

ThisWorkbook.Close savechanges:=False

End Sub

Save this workbook in your XLStart folder. Each time you open excel, it'll run
a "dummy" find. And excel will remember your settings--until you change them.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 
Back
Top