+ Reply to Thread
Results 1 to 4 of 4

sequence of numbers

  1. #1
    Forum Contributor
    Join Date
    05-08-2005
    Location
    Australia
    MS-Off Ver
    excel 2019
    Posts
    112

    sequence of numbers

    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

  2. #2
    Valued Forum Contributor
    Join Date
    06-30-2005
    Location
    Verwood, Dorset, England
    MS-Off Ver
    Excel 2000
    Posts
    479
    Quote Originally Posted by 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
    Hi Andrew

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

  3. #3
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451
    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

  4. #4
    Dana DeLouis
    Guest

    Re: sequence of numbers

    > 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
    --
    Dana DeLouis
    Win XP & Office 2003


    "Cutter" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >
    >
    > --
    > Cutter
    > ------------------------------------------------------------------------
    > Cutter's Profile:
    > http://www.excelforum.com/member.php...fo&userid=9848
    > View this thread: http://www.excelforum.com/showthread...hreadid=484630
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1