#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Find Help

I have this piece of code that I would like some help
with. What I am trying to do is find a match to whatever
value is in CurrentName, from the range NameList. But when
I try to record this I only get a absolute value reference
in the code. What do I need to change my look up value to
to accomplish this?

If ComboBox1 = "Aces" Then
Range("CurrentName").Select
Selection.Copy
Range("Namelist").Select 'CurrentName will be in this
range.
Selection.Find(What:="Pete", After:=ActiveCell,
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, MatchCase:=False).Activate 'Pete
is what was copied from CurrnetRange into the clipboard.
Selection.FindNext(After:=ActiveCell).Activate
Range("D14").Select
AddTotal

Any help would be helpful.
Thanks
Pete
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Find Help

If ComboBox1 = "Aces" Then
With Range("Namelist")
.Find(What:=Range("CurrentName").Value, _
After:=ActiveCell, _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False).Activate
.FindNext(After:=ActiveCell).Activate
End With
Range("D14").Select
AddTotal

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Pete" wrote in message
...
I have this piece of code that I would like some help
with. What I am trying to do is find a match to whatever
value is in CurrentName, from the range NameList. But when
I try to record this I only get a absolute value reference
in the code. What do I need to change my look up value to
to accomplish this?

If ComboBox1 = "Aces" Then
Range("CurrentName").Select
Selection.Copy
Range("Namelist").Select 'CurrentName will be in this
range.
Selection.Find(What:="Pete", After:=ActiveCell,
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, MatchCase:=False).Activate 'Pete
is what was copied from CurrnetRange into the clipboard.
Selection.FindNext(After:=ActiveCell).Activate
Range("D14").Select
AddTotal

Any help would be helpful.
Thanks
Pete



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
Find First Non blank cell than find column header and return that value Silver Rose Excel Worksheet Functions 10 April 30th 07 05:56 PM
where to put results of find operation in find and replace functio DEP Excel Worksheet Functions 5 November 15th 06 07:52 PM
Despite data existing in Excel 2002 spreadsheet Find doesn't find AnnieB Excel Discussion (Misc queries) 1 June 16th 06 02:15 AM
How do I find a file/spreadsheet that Excel says is Already open but I can't find it? nwtrader8 Excel Discussion (Misc queries) 5 June 21st 05 02:16 PM
backwards find function to find character in a string of text Ashleigh K. Excel Programming 1 January 14th 04 04:36 PM


All times are GMT +1. The time now is 09:25 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"