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 |
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 |
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 |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 07:45 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com