Calculate difference b/w numbers

Cobber2008

New Member
Joined
Nov 29, 2020
Messages
28
Office Version
  1. 365
Hello on the attached spreadsheet i want to for each particular row with the same Date and Time calculate the difference between each successive number based on the Rank (which is rank of Price lowest to highest). Ive calculated it for the first one manually to make it clear. So for the example with 5 rows dame date and time the difference between 6 ansd 5, 5 and 4, 4 and 3, 3 and 2, and 2 and 1. Thanks all.

DateRankTimePriceSeperation
1/04/2022​
1​
1:45:00 PM​
2.45​
0​
1/04/2022​
4​
1:45:00 PM​
10.5​
3.34​
1/04/2022​
5​
1:45:00 PM​
10.63​
0.13​
1/04/2022​
2​
1:45:00 PM​
3.93​
1.48​
1/04/2022​
3​
1:45:00 PM​
7.16​
3.23​
1/04/2022​
6​
1:45:00 PM​
30​
19.37​
1/04/2022​
1​
2:20:00 PM​
3.05​
1/04/2022​
3​
2:20:00 PM​
4.33​
1/04/2022​
4​
2:20:00 PM​
8.2​
1/04/2022​
2​
2:20:00 PM​
3.6​
1/04/2022​
5​
2:20:00 PM​
28.33​
1/04/2022​
1​
2:55:00 PM​
3.3​
1/04/2022​
2​
2:55:00 PM​
3.45​
1/04/2022​
7​
2:55:00 PM​
61.87​
1/04/2022​
3​
2:55:00 PM​
6​
1/04/2022​
5​
2:55:00 PM​
11​
1/04/2022​
6​
2:55:00 PM​
16.5​
1/04/2022​
4​
2:55:00 PM​
10.92​
1/04/2022​
1​
3:30:00 PM​
3.24​
1/04/2022​
7​
3:30:00 PM​
28.54​
1/04/2022​
3​
3:30:00 PM​
6.55​
1/04/2022​
2​
3:30:00 PM​
3.73​
1/04/2022​
6​
3:30:00 PM​
17​
1/04/2022​
5​
3:30:00 PM​
16.29​
1/04/2022​
4​
3:30:00 PM​
7.5​
1/04/2022​
1​
4:05:00 PM​
3.9​
1/04/2022​
5​
4:05:00 PM​
11.75​
1/04/2022​
7​
4:05:00 PM​
13.54​
1/04/2022​
6​
4:05:00 PM​
12.73​
1/04/2022​
8​
4:05:00 PM​
23.88​
1/04/2022​
3​
4:05:00 PM​
6.62​
1/04/2022​
4​
4:05:00 PM​
7.67​
1/04/2022​
9​
4:05:00 PM​
55.25​
1/04/2022​
2​
4:05:00 PM​
5.55​
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Is this what you mean?

24 03 08.xlsm
ABCDE
1DateRankTimePriceSeperation
24/01/202211:45:00 PM2.450
34/01/202241:45:00 PM10.53.34
44/01/202251:45:00 PM10.630.13
54/01/202221:45:00 PM3.931.48
64/01/202231:45:00 PM7.163.23
74/01/202261:45:00 PM3019.37
84/01/202212:20:00 PM3.050
94/01/202232:20:00 PM4.330.73
104/01/202242:20:00 PM8.23.87
114/01/202222:20:00 PM3.60.55
124/01/202252:20:00 PM28.3320.13
134/01/202212:55:00 PM3.30
144/01/202222:55:00 PM3.450.15
154/01/202272:55:00 PM61.8745.37
164/01/202232:55:00 PM62.55
174/01/202252:55:00 PM110.08
184/01/202262:55:00 PM16.55.5
194/01/202242:55:00 PM10.924.92
204/01/202213:30:00 PM3.240
214/01/202273:30:00 PM28.5411.54
224/01/202233:30:00 PM6.552.82
234/01/202223:30:00 PM3.730.49
244/01/202263:30:00 PM170.71
254/01/202253:30:00 PM16.298.79
264/01/202243:30:00 PM7.50.95
274/01/202214:05:00 PM3.90
284/01/202254:05:00 PM11.754.08
294/01/202274:05:00 PM13.540.81
304/01/202264:05:00 PM12.730.98
314/01/202284:05:00 PM23.8810.34
324/01/202234:05:00 PM6.621.07
334/01/202244:05:00 PM7.671.05
344/01/202294:05:00 PM55.2531.37
354/01/202224:05:00 PM5.551.65
Diff
Cell Formulas
RangeFormula
E2:E35E2=D2-VLOOKUP(MAX(B2-1,1),FILTER(CHOOSECOLS(A$2:D$35,2,4),(A$2:A$35=A2)*(C$2:C$35=C2)),2,0)
 
Upvote 0
Solution
You're welcome. Thanks for the follow-up. :)
 
Upvote 1

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

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