Formula for a Repeating Sequence

LeonardH

New Member
Joined
Dec 21, 2013
Messages
33
Office Version
  1. 365
Platform
  1. Windows
Hello,

My situation is, I have meter readings that come in daily and are ever growing. Equipment is serviced based on the meter readings and the type of service depends on a sequence. Presently this is all done manually.

My question is, if I have a repeating sequence of 16 services spaced at intervals of 250 (shown below), does someone know of a way to find which would be the next service required based on which service would be next?

Sequence #
1​
23456789101112131415
16​
Interval2505007501000125015001750200022502500275030003250350037504000
Service TypeABACABADABACABA
E​

An example would be, an equipment currently has 97,830 hours. The next service would be at 98,000 hours and would be a "D" service to follow the sequence. So, I would need a formula that returns "D Service".

Thanks in advance! My mind has been struggling with this one.



FYI, I'm in Excel 2016
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
FYI, I'm in Excel 2016
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

How about
Fluff.xlsm
ABCDEFGHIJKLMNOPQ
1Sequence #12345678910111213141516
2Interval2505007501000125015001750200022502500275030003250350037504000
3Service TypeABACABADABACABAE
4
53751E
697830D
Report
Cell Formulas
RangeFormula
C5:C6C5=INDEX($B$3:$Q$3,MOD(ROUNDUP(B5/250,0)-1,16)+1)
 
Upvote 0
Solution
Hi Leonard

sorry, I didnt catch how you know based on 97830 hours that the next service would be 98000 .. ? I didn't find any relation to your data shown above ?

thanks
Rob
 
Upvote 0
Always interesting to see how other people do it. I would use @Fluff's solution, especially if you're not on 365, but here was how I tackled it.

Template.xltx
JK
17Number:97830
18Result:D
Data
Cell Formulas
RangeFormula
K18K18=LET(n,K17,x,(TRUNC(n/250,0)+1)*250,SWITCH(MID(x,LEN(x)-2,1),"2","A","5","B","7","C","0","D"))
 
Upvote 0
Another option if you don't have the grid is
Excel Formula:
=CHOOSE(MOD(ROUNDUP(B5/250,0)-1,16)+1,"A","B","A","C","A","B","A","D","A","B","A","C","A","B","A","E")
 
Upvote 0
I didn't pay close enough attention to the sequence, so my formula wouldn't work anyway, whoops.
 
Upvote 0
Hi Leonard

sorry, I didnt catch how you know based on 97830 hours that the next service would be 98000 .. ? I didn't find any relation to your data shown above ?

thanks
Rob
Hi Rob, the service is in the repeating sequence. If the sequence repeats from 0 hours, at 98000 hours, the service would be a D service. Hope that helps!

Thanks everyone for your solutions! My sheet works great now with Fluff's solution.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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