+ Reply to Thread
Results 1 to 16 of 16

Display Last Number Used

  1. #1
    Forum Contributor
    Join Date
    05-20-2008
    Posts
    162

    Display Last Number Used

    Hi All,
    I have a list of numbers to keep a track of my Purchase Orders - they are listed in the following format.

    12345/01
    12345/02
    12345/03

    And On - And On etc, etc.

    How do i report on another sheet - which was the last number i used.

    Regards

    Craig
    Last edited by JonesZoid; 08-30-2011 at 07:22 AM. Reason: Solved

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Display Last Number Used

    Try

    =INDEX(A:A,MATCH(REPT(CHAR(255),255),A:A))

  3. #3
    Forum Contributor
    Join Date
    05-20-2008
    Posts
    162

    Re: Display Last Number Used

    =INDEX(Progress!BA:BA,MATCH(REPT(CHAR(255),255),BA:BA))

    I inputted the above formulat - but it returns #N/A

    Have i done something wrong...

    Craig

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Display Last Number Used

    try:

    =INDEX(Progress!BA:BA,MATCH(REPT(CHAR(255),255),Progress!BA:BA))

  5. #5
    Forum Contributor
    Join Date
    05-20-2008
    Posts
    162

    Re: Display Last Number Used

    I amended it to

    =INDEX(Progress!BA:BA,MATCH(REPT(CHAR(255),255),Progress!BA:BA))

    Which seemed to work fine.

    But it stopped at 12345/109 - but there are alot more beyond 109....

    Any Ideas....

    Craig

  6. #6
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Display Last Number Used

    Is the list a mix of numbers and strings? If so, try

    =INDEX(Progress!BA:BA,MAX(MATCH(99^99,Progress!BA:BA),MATCH(REPT(CHAR(255),255),Progress!BA:BA)))

  7. #7
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Display Last Number Used

    try this:

    =LOOKUP(2,1/(Progress!BA1:BA10000<>""),Progress!BA1:BA10000)

  8. #8
    Forum Contributor
    Join Date
    05-20-2008
    Posts
    162

    Re: Display Last Number Used

    The INDEX - MATCH still returns a value of #N/A

    The LOOKUP formula stopped at 109 aswell....

    The list only contains the PO numbers or Blanks...

    Craig

  9. #9
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Display Last Number Used

    Can you upload example workbook?

    make sure to remove classified data.

  10. #10
    Forum Contributor
    Join Date
    05-20-2008
    Posts
    162

    Re: Display Last Number Used

    Try this.....
    PO's on Sheet 1
    Sheet 2 showing last PO...

    Formula showing 109 as the last one, when it clearly isnt...

    Craig
    Attached Files Attached Files

  11. #11
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Display Last Number Used

    ¸Last value, that formula return is 671015/109
    And that's correct result...

    Or you want a row number? 119.

    Then yopu can use: =LOOKUP(2, 1/(A1:A10000<>""), ROW(A1:A10000))

  12. #12
    Forum Contributor
    Join Date
    05-20-2008
    Posts
    162

    Re: Display Last Number Used

    109 isnt the last one though - Row 98 shows a 113 which would be the last one.

    Is it because of the spaces....

    Craig

  13. #13
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Display Last Number Used

    OK.. So you need biggest value, not last value.. Be back with some result.

  14. #14
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Display Last Number Used

    Try these array formulae
    Please Login or Register  to view this content.
    Confirm with Ctrl+Shift+Enter not just Enter

    For the Row Number
    Please Login or Register  to view this content.
    Confirm with Ctrl+Shift+Enter not just Enter

    This assumes the prefix is constant = 671015/??

    Hope this helps

    N.B.
    You don't state your version of Excel this is for pre-2007, it can be shortened for 2007 and above by using IFERROR()
    Last edited by Marcol; 08-30-2011 at 07:05 AM.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  15. #15
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Display Last Number Used

    This is shortened version with IFERROR function that Marcol mentioned:

    ="671015/"&MAX(IFERROR(--SUBSTITUTE(A2:A10000, "671015/", ""), ""))

    comfirmed with ctrl+shift+enter

    but only for XL2007 and newer

  16. #16
    Forum Contributor
    Join Date
    05-20-2008
    Posts
    162

    Re: Display Last Number Used

    Thanks for that.....That works a treat....

    Great Job

    Craig

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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