LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default Help in highlighting and displaying found data.

I need to modify a macro. This macro finds the first instance of a name
and then displays a dialog box telling the user that it has found the name
and it's row location. I need the macro to Select the row that it has found
(so the user can see it on the screen.) or at least scroll so it is visible.
It would be good to highlight it in some manner.

Here is the macro as it is now:

'Sub FindPastDue()

' FindPastDue Macro

Lastrow = Cells(Rows.Count, "A").End(xlUp).Row

Set namerange = Range(Cells(1, "A"), Cells(Lastrow, "A"))

SearchName = InputBox("Enter Name to Find: ")

Set C = namerange.Find(SearchName, LookIn:=xlValues)

If Not C Is Nothing Then

MsgBox ("Found name: " & c & " on line " & CStr(c.Row))

Else
MsgBox ("Did not find: " & SearchName)
End If


'
End Sub


 
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
Highlighting Data IF... NPell Excel Worksheet Functions 2 April 7th 08 11:30 AM
Found Cell Highlighting after Search ULNazarene Excel Discussion (Misc queries) 1 August 21st 07 07:31 PM
highlighting rows when a value has been found mike Excel Programming 4 November 10th 05 01:00 PM
Highlighting Found Text in Excel Wordgeek Excel Discussion (Misc queries) 1 September 13th 05 01:32 PM
Highlighting blanks via GO TO SPECIAL is not highlighting blank cells - HELP, I'm totally stuck. Jamie Furlong Excel Discussion (Misc queries) 6 August 28th 05 09:27 PM


All times are GMT +1. The time now is 10:44 PM.

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

About Us

"It's about Microsoft Excel"