Sep 15 2022 11:30 PM
Sep 15 2022 11:30 PM
some assistance please!
i posted something prior but i think i confused the matter. maybe this clears it up
count how many times a the name in column A has a "yes" in column C and a "yes" in column D that occurred at the same number as column B
the answer here should be 1 for John
but if I change B9 to 2. then the answer should be 2
i tried multiple ways and im left at this
it just isnt working in so many ways i try. is this possible without vlookup? or offset? i have a big sheet so i just would love to have some direction on how to achieve this problem
attached the online version
Sep 16 2022 07:27 AM
Sep 16 2022 07:35 AM
Sep 16 2022 07:54 AM
Sep 16 2022 09:20 AM
You still are leaving many things unexplained. You think they're obvious things, which is why you don't think they need explanation. But they do.
You think you gave a full explanation to @Harun24HR in response to his question. But you actually gave only a partial answer.
Fill out your online sample sheet with more data, realistic data, and give more examples of what the rules you're wanting to program would yield.
Sep 16 2022 04:17 PM
Sep 16 2022 05:12 PM
@rangelsammon Just following the thread this time. :face_with_tears_of_joy:
Really curious to see the final answer.
Sep 16 2022 05:17 PM
Sep 16 2022 06:06 PM
@rangelsammon Just to clarify, is it a requirement that the "ball in hand" and "win" are NOT in the same row? Sorry if you answered this already.
I can see by example 1 (Game 2, Inning 2), they are on separate rows. But doesn't row 9 meet the criteria of winning within the same inning (Game 1, Inning 1) after getting ball in hand? You mentioned John's tally would increase if B9 changed to 2, however, it's a separate game so this is what's confusing me.
Also, are you looking for one count per player that meets the conditions regardless of the number of games? Or are you looking for a summary/count by each game?
I think I have a solution, I'm serious this time, but completely different approach than last time.
Sep 16 2022 06:21 PM
Sep 16 2022 07:16 PM
Since @DexterG_III thinks he has a solution, I'm going to wait and see what he comes up with.
In the meantime, may I do you the favor of pointing out one key feature that might explain some of the confusion here: it was only in reading this final description that I realized the history of this game goes from the bottom up!! I do believe it would be "normal"--though I may be just making a massive assumption--based on history of transactions (the kind of database with which I'm most familiar) when dates are entered they typically begin at the top and go down as history progresses. In that manner, I would expect the game--its scoring, its innings, its whatever-- to begin at the top and proceed downward.
And if I'm not mistaken, those numbers in Column B actually have no direct relationship to the scores; is that right?! They're just time markers (innings)...
Beyond that, what you've explained is how the "yes" entries get made. What I was looking for, and perhaps it's @DexterG_III 's explanation that does this--what I was looking for was a clearer explanation of how you waned to go from the data to the results you want; not an explanation of how the entries got there in the first place. I was looking for clarity that begins with the data--whatever it represents--the rules that would underly the formula, in other words. The rules that would answer the questions you got at the start and explain how you got the ones and twos for John....
Does that make sense? Or am I just adding confusion of my own?
Sep 16 2022 07:35 PM
Sep 16 2022 08:04 PM
@rangelsammon Okay this is not a formula but I do believe it calculates the correct count. The TableIn Query reads the table data and filters all rows only for wins = yes.
The TableOut query does the same except with BallInHand = yes. The 1st table is then merged with the second looking for a match on all three critical columns. If a player has both a BallInHand = Yes and a Win = Yes for the same game and the same inning, then it returns a 1 in the count column. As we know, this could return multiple rows so the last step is to group by player and sum the count column.
The bad news is you must press the refresh button on the TableOut query in order for the summary (K1:L2) to be updated. The good news is the refresh could be automated via VBA based on cell updates or something similar.
I know you're looking for a real time formula and it's possible someone else can provide that answer. As a backup, this might work.
Sep 16 2022 08:23 PM
Sep 16 2022 10:14 PM
@rangelsammon No worries. But if you can deselect my response as an answer please do if it's not what you were looking for. I know there are many in this forum with skills greater than mine and willing to help. I assume many will filter for unanswered questions. If you're looking for that formula, your best shot is to keep this thread open and I'd take no offense in you doing so.