View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Glenn Glenn is offline
external usenet poster
 
Posts: 1,240
Default Increment a number by multiple criteria Excel 2007

Glenn wrote:
Mark Watlock wrote:
I was asked by a co-worker to create a formula to do this but have
drawn a blank. Any ideas?
The next number increases by 11 until last digit is 0 then increases
by 10 then 11 again
2619 2630
2640
2651
2662
2673
2684
2695
2706


A single formula solution. With your starting number in A1, put this in
A2 and copy down:

=A1+11-(MOD(COUNT($A$1:A1)+RIGHT($A$1,1),11)+1=1)



Not sure how I ended up with "+1=1" at the end of that, but obviously this would
work as well:

=A1+11-(MOD(COUNT($A$1:A1)+RIGHT($A$1,1),11)=0)