Home |
Search |
Today's Posts |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Which Element in Range?
I presume you are searching a one-dimension range, i.e. all or part of one
row or one column, it would be something like this: (I put "Test" into cell "D1" and am searching the entire row 1 starting at cell "C1", ItemNo returns 2) Dim ItemNo As Long ItemNo = Range("C1").EntireRow.Find( _ What:="Test", LookIn:=xlValues, _ LookAt:=xlWhole).Column - _ Range("C1").Column + 1 MatchingCell "Stratuser" wrote: I have code that finds a cell somewhere in a range. What is the code for determining the item number of the cell within the range (i.e., the found cell is the nth cell within the range). |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
look for missing element | Excel Worksheet Functions | |||
How does one refer to the n-1 element of a named range? | Excel Discussion (Misc queries) | |||
Selecting the i-th element from a range | Excel Worksheet Functions | |||
Mapping an XML element more than once?? | Excel Discussion (Misc queries) | |||
VBA- Contains any element | Excel Programming |