1

I am trying to create a fairly basic sequence using a formula whereby columns follow the following order:

2,2,2,2,6,6,6,6,10,10,10,10,14,14,14,14 .....

I have tried a series of offsets and if statements but couldnt get it to function.

2 Answers 2

2

For values in a column, in A1 enter:

=4*(ROUNDUP(ROW()/4,0))-2

and copy downward:

enter image description here

If you have Excel 365 and want to also make a comma-separated list, then pick another cell and enter:

=TEXTJOIN(",",TRUE,A:A)

If you have Excel 365 and want to make a comma-separated list without using a "helper column", then pick a cell and enter:

=TEXTJOIN(",",TRUE,4*(ROUNDUP(SEQUENCE(20)/4,0))-2)
Sign up to request clarification or add additional context in comments.

2 Comments

thank you, thats awesome, it worked really well
@Pooman19, if it has helped and has answered your question consider to accept it as such by clicking the checkmark to the left of the answer.
0

Another way to do this is with the following code:

=IF(AND(A1=A2,A2=A3,A3=A4),A4+4,A4)

I got this idea from the following thread: Is there a way to find out the values ​of 4 cells are the same or different in MS Excel

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.