Getting wrong result

Patcheen

Active Member
Joined
Sep 28, 2015
Messages
391
Office Version
  1. 365
Platform
  1. Windows
Hi Guys and Gals

im trying to calculate how many games a team have won at home without a loss the formula im using is giving me the wrong result.

i want to calculate how many games have a team won or drew without losing the formula im using is

=MAX(FREQUENCY(IF(ISNUMBER(MATCH(J$5:$J$500,{"won","drew"},0)),ROW($J$5:$J$500)),IF($J$5:$J$500="lost",IF(I5:I500="Home",ROW($J$5:$J$500)))))

Column J is the - won drew or lost

Column I is the - Home or away


but as i say its giving me the wrong result.

thanks in advance for all help.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Try
Excel Formula:
=MAX(FREQUENCY(IF((J5:J500<>"lost")*(I5:I500="home"),ROW($J$5:$J$500)),IF(I5:I500="away",ROW($J$5:$J$500))))
 
Upvote 0
Thank you Fluff but that only gives the result 1 Thanks again
 
Upvote 0
In that case can you post some sample data along with expected result.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
IJ
2​
2​
HomeDrew
4​
4​
AwayDrew
4​
4​
AwayDrew
4​
4​
HomeDrew
4​
4​
AwayDrew
0​
3​
HomeWon
1​
3​
AwayWon
5​
5​
HomeDrew
4​
3​
HomeLost
2​
4​
AwayWon
1​
4​
AwayWon
5​
6​
HomeWon
1​
2​
AwayWon
0​
3​
HomeWon
5​
6​
AwayWon
4​
5​
HomeWon
As you can see at home there was 4 games before losing so the end result should be 4
 
Last edited:
Upvote 0
Thanks for that.
How about
Excel Formula:
=MAX(FREQUENCY(IF((J5:J500<>"lost")*(I5:I500="home"),ROW($J$5:$J$500)),IF((I5:I500="home")*(J5:J500="lost"),ROW($J$5:$J$500))))
 
Upvote 0
Solution
No Fluff Thank you. You have solved it thank you so very very much your fantastic
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top