ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Find and display (https://www.excelbanter.com/excel-programming/372253-find-display.html)

Richard Hocking

Find and display
 
Hi all,

I'm currently using the code below to find specific data in a column in a
sheet. However, although it finds correctly, the whole column remains
highlighted which can make it difficult to see the cell found. Is there some
extra code I could add to highlight temporarily the cell found?

Columns(1).Select
Application.Dialogs(xlDialogFormulaFind).Show

Any suggestions much appreciated,

Richard.

Mike Fogleman

Find and display
 
Don't select the entire column, just the cell at the top.

Range("A1").Select
Application.Dialogs(xlDialogFormulaFind).Show

Mike F

"Richard Hocking" wrote in
message ...
Hi all,

I'm currently using the code below to find specific data in a column in a
sheet. However, although it finds correctly, the whole column remains
highlighted which can make it difficult to see the cell found. Is there
some
extra code I could add to highlight temporarily the cell found?

Columns(1).Select
Application.Dialogs(xlDialogFormulaFind).Show

Any suggestions much appreciated,

Richard.




Richard Hocking

Find and display
 
I tried entering that, but then nothing is found! Surely it's only searching
cell A1 there? Of course, if I put in the range "A1:A400" it again finds the
item searched for, but still the whole range remains highlighted and I can't
see the single item highlighted!

Any further suggestions?

Richard.

"Mike Fogleman" wrote:

Don't select the entire column, just the cell at the top.

Range("A1").Select
Application.Dialogs(xlDialogFormulaFind).Show

Mike F

"Richard Hocking" wrote in
message ...
Hi all,

I'm currently using the code below to find specific data in a column in a
sheet. However, although it finds correctly, the whole column remains
highlighted which can make it difficult to see the cell found. Is there
some
extra code I could add to highlight temporarily the cell found?

Columns(1).Select
Application.Dialogs(xlDialogFormulaFind).Show

Any suggestions much appreciated,

Richard.





ufo_pilot

Find and display
 
You may only need to use a variation of the " Application.Goto Range" from
this.

Sub FindAndGoto()
Dim rngToSearch As Range
Dim rngFound As Range
Dim wks As Worksheet
Set wks = ActiveSheet
Set rngToSearch = Worksheets("sheet1").Range("A79:A1000")
Set rngFound = rngToSearch.Find(What:=wks.Range("$A$3"), _
LookAt:=xlPart, MatchCase:=False)
If Not rngFound Is Nothing Then
Application.Goto Range(rngFound.Address), True
Else
MsgBox "Not Found"
End If
End Sub

"Richard Hocking" wrote:

I tried entering that, but then nothing is found! Surely it's only searching
cell A1 there? Of course, if I put in the range "A1:A400" it again finds the
item searched for, but still the whole range remains highlighted and I can't
see the single item highlighted!

Any further suggestions?

Richard.

"Mike Fogleman" wrote:

Don't select the entire column, just the cell at the top.

Range("A1").Select
Application.Dialogs(xlDialogFormulaFind).Show

Mike F

"Richard Hocking" wrote in
message ...
Hi all,

I'm currently using the code below to find specific data in a column in a
sheet. However, although it finds correctly, the whole column remains
highlighted which can make it difficult to see the cell found. Is there
some
extra code I could add to highlight temporarily the cell found?

Columns(1).Select
Application.Dialogs(xlDialogFormulaFind).Show

Any suggestions much appreciated,

Richard.





Richard Hocking

Find and display
 
Ok, that's getting there, but it seems to search for only what is written in
Cell A3? Ideally I'd like to combine this code, which highlights the found
box, has a "not found" option (which is useful) with the first code that
brings up a Search Box and searches for whatever the user types into that
box, rather than them typing into a cell...

Can this be done?! Cheers for all the help,

Richard.


"ufo_pilot" wrote:

You may only need to use a variation of the " Application.Goto Range" from
this.

Sub FindAndGoto()
Dim rngToSearch As Range
Dim rngFound As Range
Dim wks As Worksheet
Set wks = ActiveSheet
Set rngToSearch = Worksheets("sheet1").Range("A79:A1000")
Set rngFound = rngToSearch.Find(What:=wks.Range("$A$3"), _
LookAt:=xlPart, MatchCase:=False)
If Not rngFound Is Nothing Then
Application.Goto Range(rngFound.Address), True
Else
MsgBox "Not Found"
End If
End Sub

"Richard Hocking" wrote:

I tried entering that, but then nothing is found! Surely it's only searching
cell A1 there? Of course, if I put in the range "A1:A400" it again finds the
item searched for, but still the whole range remains highlighted and I can't
see the single item highlighted!

Any further suggestions?

Richard.

"Mike Fogleman" wrote:

Don't select the entire column, just the cell at the top.

Range("A1").Select
Application.Dialogs(xlDialogFormulaFind).Show

Mike F

"Richard Hocking" wrote in
message ...
Hi all,

I'm currently using the code below to find specific data in a column in a
sheet. However, although it finds correctly, the whole column remains
highlighted which can make it difficult to see the cell found. Is there
some
extra code I could add to highlight temporarily the cell found?

Columns(1).Select
Application.Dialogs(xlDialogFormulaFind).Show

Any suggestions much appreciated,

Richard.





All times are GMT +1. The time now is 04:34 AM.

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