ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Find (https://www.excelbanter.com/excel-discussion-misc-queries/270626-find.html)

gary

Find
 
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?

Don Guillett[_2_]

Find
 
On Nov 10, 2:34*pm, gary wrote:
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
editfind

GARY

Find
 
On Nov 10, 3:29*pm, Don Guillett wrote:
On Nov 10, 2:34*pm, gary wrote:

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
editfind


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?


Gord Dibben[_2_]

Find
 
No on the backward search.

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


Gord

On Thu, 10 Nov 2011 20:30:54 -0800 (PST), GARY
wrote:

On Nov 10, 3:29*pm, Don Guillett wrote:
On Nov 10, 2:34*pm, gary wrote:

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
editfind


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?


GS[_2_]

Find
 
GARY wrote on 11/10/2011 :
On Nov 10, 3:29*pm, Don Guillett wrote:
On Nov 10, 2:34*pm, gary wrote:

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
editfind


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?

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc



Rick Rothstein

Find
 
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)

Dave Peterson[_2_]

Find
 
I don't have 2007 on this pc, but shift-clicking on the Next button on the
Edit|Find dialog in xl2003 looks backward.



On 11/10/2011 14:34, gary wrote:
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?


--
Dave Peterson

GARY

Find
 
On Nov 11, 5:15*am, Dave Peterson wrote:
I don't have 2007 on this pc, but shift-clicking on the Next button on the
Edit|Find dialog in xl2003 looks backward.

On 11/10/2011 14:34, gary wrote:

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?


--
Dave Peterson



Perfect!

Thanks, Dave


Gord Dibben[_2_]

Find
 
I never knew that!

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

You are my hero<g


Gord

On Fri, 11 Nov 2011 07:15:28 -0600, Dave Peterson
wrote:

I don't have 2007 on this pc, but shift-clicking on the Next button on the
Edit|Find dialog in xl2003 looks backward.



On 11/10/2011 14:34, gary wrote:
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?


Dave Peterson[_2_]

Find
 
In a raspy voice:

I'm Batman.



On 11/11/2011 09:33, Gord Dibben wrote:
I never knew that!

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

You are my hero<g


Gord

On Fri, 11 Nov 2011 07:15:28 -0600, Dave Peterson
wrote:

I don't have 2007 on this pc, but shift-clicking on the Next button on the
Edit|Find dialog in xl2003 looks backward.



On 11/10/2011 14:34, gary wrote:
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?


--
Dave Peterson

Rick Rothstein

Find
 
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!


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


Jim Cone[_2_]

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


"Rick Rothstein"

wrote in message ...
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!


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




GS[_2_]

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


Jim, Amen!

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc




All times are GMT +1. The time now is 12:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com