View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
AtTheEndofMyRope AtTheEndofMyRope is offline
external usenet poster
 
Posts: 10
Default Summing #N/A occurrences

On Sun, 30 Aug 2009 16:27:19 -0400, "T. Valko"
wrote:

=IF(ISNA(VLOOKUP(B33,Week17!K2:K17,1,FALSE)),0,1 )


Sounds like you're doing something with the NFL season. So, a team can only
appear once per week.

This will do the same thing as the above formula:

=COUNTIF(Week17!K2:K17,B33)


B33 is on a local sheet, and does not get filled, it gets referenced
to. It is a team city/state name.

IF it fails to get found in the array, the "#N/A" return gets tallied as
a loss. Otherwise a win is assumed.

Actually, I am tallying a 17 week / sheet array.

So, each week shows the team name of the winning team of a given game,
based on the scores entered in that week's score keeping cells.

Since the value is a text string, I count a 1 if it is present, as that
would represent a win.

I instead count the "#N/A" occurrences for losses, but assume that if
"#N/A" is not found, it MUST be a win.

The problem is when there is a bye, but that is a simple added loop
which I should put in front of only those weeks where a bye applies.

Otherwise, I only check for the N/A on the vlookup, and assume a loss
if found, and a win if not.

The teams sheet has an array that has these logical results in a 17 by
16 cell array. There is a wins column and a losses column that shows the
counts of "1" and "0" in the array.

So, IN the array, I should test for presence in the bye area on those 5?
weeks. Otherwise, I only test for the N/A, and make assumptions based on
that. I count 1s with =SUM and I count the zeros with =COUNTIF. Seems to
show wins and losses pretty well.

In the individual week sheets, where the game scores are stored, and
the team name of the winning team gets filled in, I have an isblank loop
to keep the field blank if there are no scores entered.

That way, my teams sheet can check for a blank as well, return no value
to the sum or countif cells, which should keep the wins and losses
columns correct