Subtracting scores based on dates from case numbers

Starstar1

New Member
Joined
Nov 29, 2018
Messages
4
Hello,

I need to subtract baseline score from the most recent score for a specific id. I was filtering and subtracting for each case number but there are too many entries and some have multiple dates. Please help! What is the most efficient way to do this? Formulas? I need it in the D) Results column. (I have beginner skills :/) (Using 2010 Excel on windows.)
Please see below:

A B C D
CASE_NUM Date Average Functioning Score RESULT
4185575/10/20181.27
418557 11/16/20181.27
4178705/9/20181.47
41787011/15/20181.47
4178415/4/20181.40
41784111/8/20181.40
4171314/20/20181.20
41713110/23/20181.20
4170264/26/20181.33
41702610/30/20181.33
4167004/18/20180.87
41670010/18/20180.87
4166924/9/20181.13
41669210/8/20181.13

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>

Thank you :)
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hi, welcome to the board.

Can you explain please, what do you want the results to be ?
Give results for several different examples please, and also please describe how you arrived at those results.
 
Upvote 0
Hi, welcome to the board.

Can you explain please, what do you want the results to be ?
Give results for several different examples please, and also please describe how you arrived at those results.


Hello Gerald, Thanks for replying.

The Results are the difference from the "Average functioning score". So I want to take the baseline "average functioning score" from the earliest date for a "case number" and subtract it from the most recent date of that "case number".

So it should be like this:

CASE_NUM
Date
Average Functioning Score
RESULT
265754
2/6/2018 1.60
-0.47
265754
3/21/2018 1.13
265754
10/15/2018
1.13

265064
4/2/2018
1.13
0.00
265064
4/11/2018
1.00

265064
10/1/2018
1.13

263852
4/11/2018
0.93
0.07
263852
5/1/2018
1.00

263852
5/18/2018
1.40

263852
11/5/2018
1.00



<tbody>
</tbody>

<tbody>
</tbody>

For Case number 265754 the earliest date entry is 2/6/2018, and its score is 1.60. So I want to subtract that from the latest date entry: 10/15/2018 and its score is 1.13. So it should be 1.13-1.60=-0.47. (example formula:=C3-C1)I would like to see if there is an easier way as opposed to doing it manually. I hope that makes sense. Thank you.
 
Upvote 0
OK thanks, I need to go away and think about that.

In the meantime, will the data ALWAYS be sorted in the sequence shown in post #3 ?
That could be helpful if it is.
 
Upvote 0
OK thanks, I need to go away and think about that.

In the meantime, will the data ALWAYS be sorted in the sequence shown in post #3 ?
That could be helpful if it is.

Yes, I believe so. I've sorted the Case number column so duplicates are grouped together and the dates are sorted so the earliest shows up first for corresponding case numbers. Ok, don't go away too far plz :D
Thanks for your help.
 
Upvote 0
@Starstar1
While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0
Hello,


My apologies for the double post I was super stumped and also wasn't aware that posting somewhere else can be an issue. But this is the formula that worked for me:


=IF(AGGREGATE(15,6,$B$2:$B$11/($A$2:$A$11=A2),1)=B2,INDEX($C$2:$C$11,MATCH(AGGREGATE(14,6,$B$2:$B$11/($A$2:$A$11=A2),1),INDEX($B$2:$B$11/($A$2:$A$11=A2),),))-C2,"")




-Thanks
 
Upvote 0

Forum statistics

Threads
1,215,018
Messages
6,122,703
Members
449,093
Latest member
Mnur

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