From: GEdwards on 21 Apr 2010 23:48 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)
From: GEdwards on 22 Apr 2010 00:07 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)
From: L. Howard Kittle on 22 Apr 2010 00:11 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" <GEdwards(a)discussions.microsoft.com> wrote in message news:22F4B5E9-1135-4E54-BFBD-03FB3EA8593D(a)microsoft.com... > 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)
From: Rick Rothstein on 22 Apr 2010 00:23 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" <GEdwards(a)discussions.microsoft.com> wrote in message news:21923FA6-350E-4508-8D3F-844CC97EF3F8(a)microsoft.com... > 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)
|
Pages: 1 Prev: ActiveWorkbook.Save saves to wrong directory Next: how to disable print button in preview |