Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 519
Default find the last Fred and goto cell

Hello from Steved

Using the below I want to have a macro that will find the last Fred which in
this case is in Cell A4 and put the cursor there please.

A1...Fred
A2...Biff
A3...Fred
A4...Fred
A5...Lisa

Thankyou

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default find the last Fred and goto cell

Look in the vba help index for FIND and then xlprevious from the bottom up

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Steved" wrote in message
...
Hello from Steved

Using the below I want to have a macro that will find the last Fred which
in
this case is in Cell A4 and put the cursor there please.

A1...Fred
A2...Biff
A3...Fred
A4...Fred
A5...Lisa

Thankyou


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 519
Default find the last Fred and goto cell

Hello from Steved

How do I ask the below to find the Last "Fred" please

Sub Find()
Cells.Find(What:="Fred", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate

End Sub

Thankyou.


"Don Guillett" wrote:

Look in the vba help index for FIND and then xlprevious from the bottom up

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Steved" wrote in message
...
Hello from Steved

Using the below I want to have a macro that will find the last Fred which
in
this case is in Cell A4 and put the cursor there please.

A1...Fred
A2...Biff
A3...Fred
A4...Fred
A5...Lisa

Thankyou



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default find the last Fred and goto cell

Option Explicit
Sub myFind()

Dim FoundCell As Range
With ActiveSheet
With .Range("a:a")
Set FoundCell = .Cells.Find(what:="Fred", _
after:=.Cells(1), _
LookIn:=xlValues, _
lookat:=xlWhole, _
SearchOrder:=xlByRows, _
searchdirection:=xlPrevious, _
MatchCase:=False)
End With
End With

If FoundCell Is Nothing Then
MsgBox "Fred wasn't found!"
Else
Application.Goto FoundCell, scroll:=True
End If
End Sub

Steved wrote:

Hello from Steved

How do I ask the below to find the Last "Fred" please

Sub Find()
Cells.Find(What:="Fred", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate

End Sub

Thankyou.

"Don Guillett" wrote:

Look in the vba help index for FIND and then xlprevious from the bottom up

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Steved" wrote in message
...
Hello from Steved

Using the below I want to have a macro that will find the last Fred which
in
this case is in Cell A4 and put the cursor there please.

A1...Fred
A2...Biff
A3...Fred
A4...Fred
A5...Lisa

Thankyou




--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 519
Default find the last Fred and goto cell

Thankyou.

"Dave Peterson" wrote:

Option Explicit
Sub myFind()

Dim FoundCell As Range
With ActiveSheet
With .Range("a:a")
Set FoundCell = .Cells.Find(what:="Fred", _
after:=.Cells(1), _
LookIn:=xlValues, _
lookat:=xlWhole, _
SearchOrder:=xlByRows, _
searchdirection:=xlPrevious, _
MatchCase:=False)
End With
End With

If FoundCell Is Nothing Then
MsgBox "Fred wasn't found!"
Else
Application.Goto FoundCell, scroll:=True
End If
End Sub

Steved wrote:

Hello from Steved

How do I ask the below to find the Last "Fred" please

Sub Find()
Cells.Find(What:="Fred", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate

End Sub

Thankyou.

"Don Guillett" wrote:

Look in the vba help index for FIND and then xlprevious from the bottom up

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Steved" wrote in message
...
Hello from Steved

Using the below I want to have a macro that will find the last Fred which
in
this case is in Cell A4 and put the cursor there please.

A1...Fred
A2...Biff
A3...Fred
A4...Fred
A5...Lisa

Thankyou




--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default find the last Fred and goto cell

A1...Fred
A2...Biff
A3...Fred
A4...Fred
A5...Lisa


Hmmm....that looks familiar!


--
Biff
Microsoft Excel MVP


"Steved" wrote in message
...
Hello from Steved

Using the below I want to have a macro that will find the last Fred which
in
this case is in Cell A4 and put the cursor there please.

A1...Fred
A2...Biff
A3...Fred
A4...Fred
A5...Lisa

Thankyou



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 519
Default find the last Fred and goto cell

Hello Biff from Steved

oops! yes I thought I'd use it it to explain what I required

"T. Valko" wrote:

A1...Fred
A2...Biff
A3...Fred
A4...Fred
A5...Lisa


Hmmm....that looks familiar!


--
Biff
Microsoft Excel MVP


"Steved" wrote in message
...
Hello from Steved

Using the below I want to have a macro that will find the last Fred which
in
this case is in Cell A4 and put the cursor there please.

A1...Fred
A2...Biff
A3...Fred
A4...Fred
A5...Lisa

Thankyou




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
How do you count number of times Fred Smith appears in a list Geoff Excel Discussion (Misc queries) 1 October 5th 07 04:58 PM
Goto a specific cell in a macro Edward Excel Discussion (Misc queries) 0 July 16th 07 08:24 PM
Are Fred Pryor Seminars good? [email protected] Excel Discussion (Misc queries) 10 November 15th 06 05:51 AM
I need help fred smith scats Excel Worksheet Functions 1 November 14th 06 04:32 AM
Goto a dynamic cell address within a macro blkane Excel Discussion (Misc queries) 3 June 8th 05 07:08 PM


All times are GMT +1. The time now is 08:56 AM.

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

About Us

"It's about Microsoft Excel"