ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Excel has a "Find Next" command but no "Find Previous" command. (https://www.excelbanter.com/excel-discussion-misc-queries/3459-excel-has-%22find-next%22-command-but-no-%22find-previous%22-command.html)

Michael Fitzpatrick

Excel has a "Find Next" command but no "Find Previous" command.
 
Excel allows one to do a "Find Next" to find text in a worksheet. But there
is no "Find Previous" command. How would one implement a "Find Previous" to
find a string of text before the present cell?


Alan Beban

Michael Fitzpatrick wrote:
Excel allows one to do a "Find Next" to find text in a worksheet. But there
is no "Find Previous" command. How would one implement a "Find Previous" to
find a string of text before the present cell?


To find the next previous occurrence of 4 in Column A preceding the Cell A6,

Set rng = Range("a1:a14")
Set x = rng.Find(4, Range("A6"), , , , xlPrevious)

Alan Beban

Dave Peterson

And if you're doing it manually via the Edit|find dialog, just shift-click on
the Find button.



Michael Fitzpatrick wrote:

Excel allows one to do a "Find Next" to find text in a worksheet. But there
is no "Find Previous" command. How would one implement a "Find Previous" to
find a string of text before the present cell?


--

Dave Peterson


All times are GMT +1. The time now is 08:50 PM.

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