Start by simplifying things, eg remove the Is iserror etc
Define the Name exactly as I posted
Put "Quarterbacks" somewhere in col-a and "Kickers" some cells below. Fill
in all the cells between, ie no empty cells for the next test
=COUNTA(Players)
This should return the count of the 'filled in' cells; if not the named
formula is not correctly entered or spellings not correct.
Enter "J. Smith" in one of the between cells
=MATCH("J. Smith",Players)
This should return the number of rows below Quarterbacks.
Now to return the actual row
=ROW(Players)+MATCH("J. Smith",Players,0)-1
Try substituting "Players" with the name's formula, without all the sheet
names that automatically get added (unless you're on another sheet
I would suggest instead of trying to create a massive formula in one go,
split into 3 or 4 cells and check each one. If and when all working combine
them if you really need to.
I defined the Offset as a single column in Col-A. This could of course be
any number of columns, the first of which might be off to the right of
Col-A.
If you are need to return the contents cell to the right of "J. Smith"
instead of your Match try VLookup.
Regards,
Peter T
OK, I dont know..I'm confused, here lets try this...
Sheet: Stats
A24:John Smith
A25:John Harper
Sheet: HiddenStats
A20:Quarterbacks
A21:Name
A22:J. Smith
A23:J. Harper
A24:Key: GP=Games Played, GS=Games Started, ATT=Pass Attempts,
CP=Completions, CP%=Completion %, YDS=Passing Yards, TD=Passing
Touchdowns
A25:
A26:Running Backs
A27:Name
A28:J. Smith
A29:A. Norris
See how there is a J.Smith under Quarterbacks and Running Backs, one is
John Smith the other is Jason Smith. I use the following line of code
on sheet STATS to pull the stats of the players which are to the right
of the names from HiddenStats to Stats...
=IF(ISERROR(INDEX(HiddenStats!$A$20:$N$150,MATCH(LEFT(A24)&".
"&MID(A24,FIND("
",A24)+1,255),HiddenStats!$A$20:$A$150,FALSE),2)),"",INDEX(HiddenStats!$A$20
:$N$150,MATCH(LEFT(A24)&".
"&MID(A24,FIND(" ",A24)+1,255),HiddenStats!$A$20:$A$150,FALSE),2))
That makes it where it matches John or Jason Smith to J. Smith. This
causes a problem. I need it to only look for John Smith under
quarterbacks.
The stats in HiddenStats are pulled from a webquery, some teams might
have more quarterbacks, which in turn would mean more cells under
quarterbacks.
How can I have it where it only looks for matches below the word
Quarterbacks and Above the word Running Backs.
If there is an easier way to do this, I would love to hear it.
Elsewhere in the thread you mentioned named range, try this
Name: Players
Refersto:
=OFFSET($A:$A,MATCH("Quarterbacks",$A:$A,0),,MATCH("Kickers",$A:$A,0)-MATCH
(
"Quarterbacks",$A:$A,0)-1)
This should return a reference to players in Col-A no matter which cell you
use a formula, eg
=Sum(Players)
If the formula does not include the absolute addressing it will be relative
to the cell selected when you define the refersto. IOW can return a ref to
any column relative to the cell used in a formula.
Regards,
Peter T
Regards,
Peter T
text -- Show quoted text -