Excel formula

I am looking for a excel formula to create the below if possible...

The row number to increase by 1 every 4 rows. So it would be like the below...

1
1
1
2
2
2
3
3
3
4
4
4

How would I do this?
petewinterAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bill PrewCommented:
Assuming you wanted to start at row 1, then this would work.  I'm sure there are many other ways to accomplish this also.

=TRUNC((ROW()-1)/3)+1

~bp
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
petewinterAuthor Commented:
Many thanks, but how do I start at a particular number instead of 1?
0
SteveCommented:
You can also use INT:

=INT((ROW()-1)/3)+1

Change the +1 at the end to start from a diferent number (in both formulas)
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Bill PrewCommented:
Many thanks, but how do I start at a particular number instead of 1?
Just change the "1" at the end of the formula.

~bp
0
petewinterAuthor Commented:
Many thanks
0
Bill PrewCommented:
Welcome, glad that was useful.

~bp
0
Rob HensonFinance AnalystCommented:
Assuming you are entering the first number in the first row required, use this formula in rows below it:

=IF(COUNTIF(M$1:M1,M1)>=3,M1+1,M1)

This assumes starting at M1 but can start on any row with manual entry in first cell. Adjust the number in bold for the number of rows required.

Thanks
Rob H
0
Saqib Husain, SyedEngineerCommented:
Although the question is closed, I would have used this approach:

Enter the three ones in A1, A2, A3.
In A4 enter the formula =A1+1
And copy this formula down.
0
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
More robust approach would be like this....

=INT((ROWS(A$1:A1)-1)/3)+1

This way you can place your formula in any desired cell and copy it down.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.