Formula to increment numbers 1,1,1,2,2,2,etc.

mgirvin

Well-known Member
Joined
Dec 15, 2005
Messages
1,236
Office Version
  1. 365
Platform
  1. Windows
Dear Smartest Excelers In The World,

I would like a formula that I could copy down column A that would give me a column of numbers like this: 1;1;1;2;2;2;3;3;3;4;4;4 etc.

I have used formulas like this:

=MOD(ROWS(A$1:A1)-1,3)+1

to give me a column of numbers like this: 1;2;3;1;2;3;1;2;3 etc.

But I can not seem to think of one for 1;1;1;2;2;2 etc.

Any ideas?
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Dear Smartest Excelers In The World,

I would like a formula that I could copy down column A that would give me a column of numbers like this: 1;1;1;2;2;2;3;3;3;4;4;4 etc.

I have used formulas like this:

=MOD(ROWS(A$1:A1)-1,3)+1

to give me a column of numbers like this: 1;2;3;1;2;3;1;2;3 etc.

But I can not seem to think of one for 1;1;1;2;2;2 etc.

Any ideas?

Can't just type 1, 1, 1 in A1:A3, then A4 = A1+1, drag down?
 
Upvote 0
Thanks, mhenk, jonmo1, Aladin, HOTPEPPER, dbrown!!!

This definitely solves my problem!

However, formulas aside, they best thing that I learned from your answers is the new word:

Robustify!

I am adding this to vocabulary and I will use the word often! (I am even going to add it to my Spell Checker so that I do not get a red wiggle line under it!)
 
Upvote 0

Forum statistics

Threads
1,216,100
Messages
6,128,827
Members
449,470
Latest member
Subhash Chand

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