+ Reply to Thread
Results 1 to 6 of 6

How to put a sequence on a set of numbers

  1. #1
    Registered User
    Join Date
    07-31-2017
    Location
    Sydney
    MS-Off Ver
    2016
    Posts
    3

    Question How to put a sequence on a set of numbers

    Hello

    Sorry if this doesn't make sense.. I have tried looking for a formula to my problem, but I don't think I actually know what I am looking for.

    I am implementing a new HR system and I have to upload a list of bank accounts for all employees. What I have been asked to do is insert a "line number" for each employee

    Every employee number is a unique number (starting at 1 for my first employee), they keep this number no matter how many accounts they have, for example:

    Line Number Emp #

    1 1904
    1 1904
    1 1904
    1 1904
    2 1806
    3 0125
    3 0125
    3 0125
    4 6854
    5 5498
    5 5498



    I cannot work out for the life of me what formula or how to do the above. (sorry the attached image has an error in it and I couldn't work out how to remove it)

    regards

    Stephanie
    Attached Images Attached Images

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,862

    Re: How to put a sequence on a set of numbers

    Assuming line numbers are in column A and Emp# in column B (1st row=headers) in cell A2 write a formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and copy down.
    Best Regards,

    Kaper

  3. #3
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454

    Re: How to put a sequence on a set of numbers

    Hi,

    Assuming your data (employee number) is in column B starting in B1, and that all duplicates are concurrent;

    Enter "1" in cell A1

    In A2, =IF(B2=B1,A1,A1+1)

    copy A2 down the length of your data.
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,862

    Re: How to put a sequence on a set of numbers

    I'd add that simple formula above works perfect if all amployee# for one employee are listed in one group. If are mixwd, like:

    1 11
    2 1121
    1 11
    3 113
    3 113
    1 11
    simple (if current # is different than previous: add 1 to value above, if not: take the same value) formula will lead to wrong results.

  5. #5
    Registered User
    Join Date
    07-31-2017
    Location
    Sydney
    MS-Off Ver
    2016
    Posts
    3

    Re: How to put a sequence on a set of numbers

    Thank you

    That worked a treat..

    stephanie

  6. #6
    Registered User
    Join Date
    07-31-2017
    Location
    Sydney
    MS-Off Ver
    2016
    Posts
    3

    Re: How to put a sequence on a set of numbers

    Thank You!

    I would not have worked that one out myself... worked a treat

    cheers

    Stephanie

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to convert a range of numbers to sequence of numbers in an array
    By MetisConnect in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-25-2015, 11:53 AM
  2. Sequence 10,000 numbers
    By Rob K in forum Excel General
    Replies: 2
    Last Post: 07-02-2014, 05:32 AM
  3. Replies: 3
    Last Post: 08-20-2013, 03:59 AM
  4. [SOLVED] Creating a sequence based on numbers in one column and adding "01,02..." to a new sequence
    By JCR1968 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-05-2013, 08:06 AM
  5. [SOLVED] Random numbers but 3 numbers in sequence not allowed.
    By NewGen in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 07-31-2012, 07:51 AM
  6. Sequence of numbers
    By JohnUK in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-04-2006, 09:30 AM
  7. sequence numbers
    By su su in forum Excel General
    Replies: 4
    Last Post: 05-11-2005, 10:06 PM

Tags for this Thread

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