+ Reply to Thread
Results 1 to 9 of 9

If with individual Number

  1. #1
    Registered User
    Join Date
    03-31-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    10

    If with individual Number

    Hi

    I have the following number in a cells, I am looking to copy them over via a formula to create individual numbers with no duplicates.

    Lets say in first column is the following numbers

    1
    1
    2
    2
    2
    3
    3
    4
    4
    4
    4

    I am looking to write a formula so in the next sheet all I have is the following

    1
    2
    3
    4

    I had the following formula Cell A1 of next sheet = =Sheet2!A1
    In Cell A2 I had this formula =IF(Sheet2!A2=A1,Sheet2!A2, Sheet2!A3)

    This worked until I had the number occuring more than twice in the column

    Thanks in advance

    Jezza

  2. #2
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: If with individual Number

    Hi,

    Please try the following formula in Sheet2 A1

    =IFERROR(VLOOKUP(ROW(),Sheet1!$A$1:$A$11,1,FALSE),"")
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: If with individual Number

    You will need an array formula.

    https://www.youtube.com/watch?v=vAEPXVf3uOs
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  4. #4
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: If with individual Number

    Added a helper column in the attached file and now the formula works even if there are missing numbers in between. However, you need to SORT the numbers A-Z before you apply this.

    See if it works for you, otherwise you may have to opt for an array formula as suggested by mehmetcik
    Attached Files Attached Files

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: If with individual Number

    Hi,

    Why not just select the range and use the 'Remove Duplicates' functionality?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: If with individual Number

    jezza25, in your example, the numbers are strictly ascending and strictly sequential. Is that always true in your data? Could you have data that skips numbers, or lists them in a different order?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  7. #7
    Registered User
    Join Date
    03-31-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: If with individual Number

    Thanks CBATRODY,

    I sort of works I think it is the start rows I am having a issue with, below is a sample of actual numbers, the first number actually appears in cell C6 and the formula on the next sheet starts on A6. I seem to miss the first 5 using attached formula

    8746925
    8746925
    8746926
    8746926
    8746927
    8746927
    8746928
    8746929
    8746930
    8746931
    8746933
    8746942


    Jezza

  8. #8
    Registered User
    Join Date
    03-31-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: If with individual Number

    Hi Richard, Because I want the person to drop a sheet in and it could have 1000's of rows, the less steps for them the better

  9. #9
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: If with individual Number

    Hi,

    See the attached file, I have modified it as per your requirement.
    Attached Files Attached Files

+ 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. Calculating number of times individual number appears in a pivot table
    By snoopy1461 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-15-2014, 08:39 AM
  2. Splitting a number into individual digits
    By cdesantis01 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-23-2014, 08:50 AM
  3. Listing individual numbers from a whole number
    By JakeMann in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-12-2013, 01:25 PM
  4. Break out a number into individual cells
    By khank in forum Excel General
    Replies: 2
    Last Post: 12-16-2010, 09:56 AM
  5. How circle an individual number in a cell?
    By Chet in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-26-2006, 07:50 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