Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Simple... Using FIND, I need to get the row and cell

Using the FIND below, what do I need to get the row and cell where I find the
match in column B?

With Sheets("Sheet1").Range("B:B")
Set Rng = .Find(What:="I-100421224950", _
After:=.Cells(.Cells.Count), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Simple... Using FIND, I need to get the row and cell

It's OK, I got it! Just needed to continue with

If Not Rng Is Nothing Then
Application.Goto Rng, True
MsgBox ActiveCell.Row & "." & ActiveCell.Column
End

"GEdwards" wrote:

Using the FIND below, what do I need to get the row and cell where I find the
match in column B?

With Sheets("Sheet1").Range("B:B")
Set Rng = .Find(What:="I-100421224950", _
After:=.Cells(.Cells.Count), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 698
Default Simple... Using FIND, I need to get the row and cell

Try this::

Sub FindaBunchOnumbers()
Columns("B:B").Find(What:="I-100421224950", _
After:=ActiveCell, LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate

MsgBox ActiveCell.Address
End Sub

Modified from the macro recorder.

HTH
Regards,
Howard

"GEdwards" wrote in message
...
Using the FIND below, what do I need to get the row and cell where I find
the
match in column B?

With Sheets("Sheet1").Range("B:B")
Set Rng = .Find(What:="I-100421224950", _
After:=.Cells(.Cells.Count), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Simple... Using FIND, I need to get the row and cell

You don't have to go to the cell (unless you want to); you could have
continued this way instead...

If Not Rng Is Nothing Then
MsgBox Rng.Row & "." & Rng.Column
End If

--
Rick (MVP - Excel)



"GEdwards" wrote in message
...
It's OK, I got it! Just needed to continue with

If Not Rng Is Nothing Then
Application.Goto Rng, True
MsgBox ActiveCell.Row & "." & ActiveCell.Column
End

"GEdwards" wrote:

Using the FIND below, what do I need to get the row and cell where I find
the
match in column B?

With Sheets("Sheet1").Range("B:B")
Set Rng = .Find(What:="I-100421224950", _
After:=.Cells(.Cells.Count), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)


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
Simple Find Blank row Nikki Excel Discussion (Misc queries) 3 December 28th 06 07:56 PM
Simple find with right function Richard Ruda Excel Worksheet Functions 14 November 2nd 05 08:06 PM
simple find tcpteacher Excel Worksheet Functions 2 October 29th 05 02:09 PM
Simple question to find min value Tre_cool[_4_] Excel Programming 4 August 22nd 05 09:18 PM
So simple I can't find the answer! Mark \(InWales\)[_3_] Excel Programming 3 October 15th 04 07:03 AM


All times are GMT +1. The time now is 07:30 PM.

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"