Simple or Complicated Sequencing Formula?

MrDentist

New Member
Joined
May 24, 2018
Messages
2
Hi all,

I need to know if theres a way you can make a formula for the parameters below-

Plus 9 except when reaching a multiple of 10, then plus 10 then plus 19 then carry on with plus 9.

For example-

12512, 12521, 12530, 12540, 12559, 12568, 12577.

Many thanks if this can be done! Don't know how complicated or easy it would be!
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Welcome to the Board!

Let's say that you have the number 12512 in cell A1.

Then place this formula in cell A2:
Code:
=A1+IF(RIGHT(A1,1)="0",10,9)
and then this formula in cell A3, and copy down as far as you want:
Code:
=A2+IF(RIGHT(A2,1)="0",10+IF(RIGHT(A1,1)="0",9,0),9)
 
Upvote 0
Please try this:

Put 12512 in cell A2
put this formula starting in Cell A3: =IF(AND(MOD(A2,10)=0,MOD(A1,10)=0),A2+19,IF(MOD(A2,10)=0,A2+10,A2+9))
copy down
 
Upvote 0
Maybe try:

Assuming the first 2 cells of data are already filled in A4 and B4 and copy across:

=IF(B4-A4=10,B4+19,IF(MOD(B4,10)=0,B4+10,B4+9))
 
Upvote 0
Welcome to the Board!

Let's say that you have the number 12512 in cell A1.

Then place this formula in cell A2:
Code:
=A1+IF(RIGHT(A1,1)="0",10,9)
and then this formula in cell A3, and copy down as far as you want:
Code:
=A2+IF(RIGHT(A2,1)="0",10+IF(RIGHT(A1,1)="0",9,0),9)

Many thanks buddy,

You're a lifesaver! Works perfectly!
 
Upvote 0
You are welcome. Glad we could help.

As you can see, there are multiple different formulas that will work.
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,250
Members
452,623
Latest member
Techenthusiast

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