sequence of numbers

A

andrewm

how do I do a formula to automatically put numbers in a cell

if a1 = 1

I would like a2, a3, a4, a5, a6..... to be 2,3,4,1,2,3,4.....

how do I make the sequence change from 4 back to 1

ie. a1 maybe 3

thus a2,a3,a4,a5,6......would be 4,1,2,3,4,12.......

what would the formulas be in the cells


andrewm
 
P

Paul Sheppard

andrewm said:
how do I do a formula to automatically put numbers in a cell

if a1 = 1

I would like a2, a3, a4, a5, a6..... to be 2,3,4,1,2,3,4.....

how do I make the sequence change from 4 back to 1

ie. a1 maybe 3

thus a2,a3,a4,a5,6......would be 4,1,2,3,4,12.......

what would the formulas be in the cells


andrewm

Hi Andrew

In B1 put this formula =IF(A1<4,A1+1,A1-3) and drag across as far a
require
 
C

Cutter

Same result with different approach:

In A2 type: =IF(MOD(A1+1,4)=0,4,MOD(A1+1,4))

and drag copy down as far as necessary
 
D

Dana DeLouis

In A2 type: =IF(MOD(A1+1,4)=0,4,MOD(A1+1,4))

I think this may be equivalent:
=MOD(A1,4)+1

However, another option might be:
A1: =MOD(ROW()-1,4)+1

...and copy down
HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top