Formula to add 1 for previous day

DerekWooley

New Member
Joined
May 1, 2018
Messages
34
Hello, I have a list of Machines on each Friday that I would like to flag with a number. The latest Friday should have a 2 and each Friday before that should be marked with one less than the last. My data is below.

DateDayMachineFriday Identifier
7/27/2018FridayMachine 14
7/27/2018FridayMachine 24
7/27/2018FridayMachine 34
7/27/2018FridayMachine 44
7/27/2018FridayMachine 54
7/27/2018FridayMachine 64
8/3/2018FridayMachine 13
8/3/2018FridayMachine 23
8/3/2018FridayMachine 33
8/10/2018FridayMachine 12
8/10/2018FridayMachine 22
8/10/2018FridayMachine 32
8/10/2018FridayMachine 42
<colgroup><col width="90" style="width: 68pt; mso-width-source: userset; mso-width-alt: 3291;"> <col width="45" style="width: 34pt; mso-width-source: userset; mso-width-alt: 1645;"> <col width="70" style="width: 53pt; mso-width-source: userset; mso-width-alt: 2560;"> <col width="108" style="width: 81pt; mso-width-source: userset; mso-width-alt: 3949;"> <tbody> </tbody>

Thank you for any help.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Formula in D2:
=IF(A2="","",(MAX(A:A)-A2)/7+2)

Copy down.


Excel 2010
ABCD
1DateDayMachineFriday Identifier
27/27/2018FridayMachine 15
37/27/2018FridayMachine 25
47/27/2018FridayMachine 35
57/27/2018FridayMachine 45
67/27/2018FridayMachine 55
77/27/2018FridayMachine 65
88/3/2018FridayMachine 14
98/3/2018FridayMachine 24
108/3/2018FridayMachine 34
118/10/2018FridayMachine 13
128/10/2018FridayMachine 23
138/10/2018FridayMachine 33
148/10/2018FridayMachine 43
158/17/2018FridayMachine 52
Sheet1
Cell Formulas
RangeFormula
D2=IF(A2="","",(MAX(A:A)-A2)/7+2)
D3=IF(A3="","",(MAX(A:A)-A3)/7+2)
D4=IF(A4="","",(MAX(A:A)-A4)/7+2)
D5=IF(A5="","",(MAX(A:A)-A5)/7+2)
D6=IF(A6="","",(MAX(A:A)-A6)/7+2)
D7=IF(A7="","",(MAX(A:A)-A7)/7+2)
D8=IF(A8="","",(MAX(A:A)-A8)/7+2)
D9=IF(A9="","",(MAX(A:A)-A9)/7+2)
D10=IF(A10="","",(MAX(A:A)-A10)/7+2)
D11=IF(A11="","",(MAX(A:A)-A11)/7+2)
D12=IF(A12="","",(MAX(A:A)-A12)/7+2)
D13=IF(A13="","",(MAX(A:A)-A13)/7+2)
D14=IF(A14="","",(MAX(A:A)-A14)/7+2)
D15=IF(A15="","",(MAX(A:A)-A15)/7+2)
 
Last edited:
Upvote 0
Thank you very much. I had other weekdays between the Fridays which caused decimals so I added a max if weekday = 6 and turned it into an array formula: =if(A2="","",max(if($G2:$G$200=1,$A$2:A200))-A2)/7+2). Row G has the IF weekday = 6 put 1.

Thank you again!
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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