Syntax Help Please

Gunslinger380

New Member
Joined
Jul 3, 2017
Messages
18
Hi all,


If someone could please help me with the proper formula I would grateful.

here is the situation. for my fantasy league I have in column A the season dates. In column B I have the teams, and in Column C I have wins and losses. I am having some trouble finding the correct formulas that will look up the last three dates from today and pull the results for the team. note: I am looking for three separate formulas i.e. one for the last result, one for the second oldest result, and one for the third oldest.

I am also looking for something that will give me the next three future dates for a team. i.e the next game from today and so on.

I have a decent general knowledge of the functions and entering them into formulas I am having just a bit of trouble putting it all together.


Thanks in advance
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
EDIT: for some reason, the MAX formulas are refusing to be posted in full. They're the same as the MIN formulas, but replace MIN with MAX, replace > with < and make sure the cell references are shifted up to the F5-F7 cells
<today())*($b$2:$b$40=$f$2),$a$2:$a$40))
<today())*($b$2:$b$40=$f$2),$a$2:$a$40))


I think this might do what you're after. You have to press CONTROL+SHIFT+ENTER for these formulas... {} should appear around the formulas if done properly.

ABC DEFG
1
225/05/2017abc9/6Select Team:xyz
31/06/2017xyz3/6
48/06/2017whatever6/6DateScore
515/06/2017abc7/3Last result:
622/06/2017xyz10/6Second Last Result:
729/06/2017whatever5/2Third Last Result:
86/07/2017xyz8/3
913/07/2017whatever9/8Next Game Date:
1020/07/2017xyz3/5Two Games:
1127/07/2017whatever7/9Three Games:
12.........

<tbody>
</tbody>

<today())*($b$2:$b$40=$f$2),$a$2:$a$40))
<f5) *($b$2:$b$40="$F$2),$A$2:$A$40))
<today())*($b$2:$b$40=$f$2),$a$2:$a$40))
<today())*($b$2:$b$40=$f$2),$a$2:$a$40))
F6: =MAX(IF(($A$2:$A$40<F5)*($B$2:$B$40=$F$2),$A$2:$A$40))
<f5) *($b$2:$b$40=" $f$2),$a$2:$a$40))
<f5)*($b$2:$b$40=$f$2),$a$2:$a$40))
<f5)*($b$2:$b$40=$f$2),$a$2:$a$40))
<f6)*($b$2:$b$40=$f$2),$a$2:$a$40))
F5: =MAX(IF(($A$2:$A$40<today())*($b$2:$b$40=$f$2),$a$2:$a$40))
<f5) *($b$2:$b$40="$F$2),$A$2:$A$40))
F6: =MAX(IF(($A$2:$A$40<F5)*($B$2:$B$40=$F$2),$A$2:$A$40))
<f5) *($b$2:$b$40=" $f$2),$a$2:$a$40))
<f5)*($b$2:$b$40=$f$2),$a$2:$a$40))
<f5)*($b$2:$b$40=$f$2),$a$2:$a$40))
F7: Fill down from F6<f6)*($b$2:$b$40=$f$2),$a$2:$a$40))
</f6)*($b$2:$b$40=$f$2),$a$2:$a$40))
</f5)*($b$2:$b$40=$f$2),$a$2:$a$40))
</f5)*($b$2:$b$40=$f$2),$a$2:$a$40))
</f5)></today())*($b$2:$b$40=$f$2),$a$2:$a$40))
</f6)*($b$2:$b$40=$f$2),$a$2:$a$40))
</f5)*($b$2:$b$40=$f$2),$a$2:$a$40))
</f5)*($b$2:$b$40=$f$2),$a$2:$a$40))
</f5)>

G5: =INDEX($C$2:$C$40,MATCH(F5,IF($B$2:$B$40=$F$2,$A$2:$A$40),0))
G6: Fill from G5
G7: Fill from G6

F9: =MIN(IF(($A$2:$A$40>TODAY())*($B$2:$B$40=$F$2),$A$2:$A$40))
F10: =MIN(IF(($A$2:$A$40>F9)*($B$2:$B$40=$F$2),$A$2:$A$40))
F11: </today())*($b$2:$b$40=$f$2),$a$2:$a$40))
Fill down from F10</today())*($b$2:$b$40=$f$2),$a$2:$a$40))
</today())*($b$2:$b$40=$f$2),$a$2:$a$40))
 
Last edited:
Upvote 0
Yes! thank you very much! the last three were what I was looking for. I can flip MIN and MAX around to get the desired date then use SUMIFS to put the data where I need it. This is exactly what I needed, I was just a little uncertain about the array formula.

Thanks again!!!
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

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