Find

  • Thread starter Thread starter gary
  • Start date Start date
G

gary

In Excel 2007, FIND searches the cells that are AFTER the location of
the cursor.
Is there a way to search the cells that are BEFORE the cursor?
 
In Excel 2007, FIND searches the cells that are AFTER the location of
the cursor.
Is there a way to search the cells that are BEFORE the cursor?

you might try selecting the column LETTER or row NUMBER then
edit>find>>
 
you might try selecting the column LETTER or row NUMBER then
edit>find>>

XXXX is in C147, C149, C151 and C152
The cursor is in C153.
I type XXXX in the "Find What" box.
If I select column C, Find will locate XXXX in C147..
Is there a way to find XXXX in C152?

(I'm asking if there's a way to do a "backward" search?
 
No on the backward search.

Just keep clicking on find next. You'll eventually get to C152.


Gord
 
GARY wrote on 11/10/2011 :
XXXX is in C147, C149, C151 and C152
The cursor is in C153.
I type XXXX in the "Find What" box.
If I select column C, Find will locate XXXX in C147..
Is there a way to find XXXX in C152?

(I'm asking if there's a way to do a "backward" search?

Can you use VBA and 'dump' the range into a Variant so you can loop the
resulting array backwards?
 
Can you use VBA and 'dump' the range into a Variant so you
can loop the resulting array backwards?

If you use VBA, there is no need for a loop...

Sub FindPrevious()
Dim What As String, Found As Range
What = InputBox("What do you want to find?")
On Error Resume Next
Set Found = Intersect(ActiveCell.EntireColumn, Range("1:" & _
ActiveCell.Row).Find(What, ActiveCell, xlValues, _
xlWhole, , xlPrevious, False))
If Found Is Nothing Then
MsgBox "Sorry, but " & What & " does not appear above cell " & _
ActiveCell.Address(0, 0) & ".", vbExclamation
Else
Found.Select
End If
End Sub

Rick Rothstein (MVP - Excel)
 
I don't have 2007 on this pc, but shift-clicking on the Next button on the
Edit|Find dialog in xl2003 looks backward.
 
I never knew that!

But logical now you think about it.............kinda like Shift + Tab
goes backwards

You are my hero<g>


Gord
 
In a raspy voice:

I'm Batman.



I never knew that!

But logical now you think about it.............kinda like Shift + Tab
goes backwards

You are my hero<g>


Gord
 
I don't have 2007 on this pc, but shift-clicking on the Next
I never knew that!

Me either!!!
But logical now you think about it.............kinda like
Shift + Tab goes backwards

Yes, that does make sense now that you mention it. I'm kind of mad at myself
for not having figured it out on my own. I mean, I know the VB Find method
has a search previous option so it makes sense the dialog box should have it
also, but it never occurred to me to look. Thanks for pointing it out Dave.

By the way, talking about the Find (and Replace) dialog boxes... why is
there an "Options>>" button? Wouldn't it have made more sense, given there
are not all that many options, to just have the dialog box always opened up
to show all the options all the time? And would it have hurt that much to
have simply put a Previous button on the dialog box as opposed to hiding the
option behind the Shift key?

Rick
 
Learned something.
I just wish that worked in the VBE (switching to "up" is a pain).
'---
Jim Cone


"Rick Rothstein"
 
Back
Top