+ Reply to Thread
Results 1 to 8 of 8

Help: Find the last appearence of a number ?

  1. #1
    Registered User
    Join Date
    06-02-2012
    Location
    Romania
    MS-Off Ver
    Excel 2010
    Posts
    95

    Help: Find the last appearence of a number ?

    Hello !

    Let's say I have ten rows filled with numbers on six columns, which represent the last ten lottery draws.
    I need a formula to find out when the present number appeared last time in these draws.

    Let's say the 11 draws is 23-37-45-9-1-39
    On the other table I will get something like this:
    0-3-1-8-7-2 which means:
    23 has not been drawn at all in the last existent 10 draws;
    37 has been drawn in the draw number 7 (or 3 draws ago);
    45 has been drawn just in the last draw;
    9 has been drawn in the second draw of those 10 existent draws;
    1 has been drawn in the 3rd draw of those existent 10 draws;
    and
    39 has been drawn not in the last draw but in the one before the last one draw.

    Moreover, the formula I need to do this should not count for the number position inside the rows but it should cont for the number's position from a row to another because the row itself represents a draw.

    If someone could help me, this would be appreciated.

    Thank you so much !
    Last edited by Mr.Nob0OOdy; 06-09-2012 at 07:29 AM.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Help: Numbers Frequency ?

    oh no not another lottery thing..there are plenty of on line lottery checkers
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    06-02-2012
    Location
    Romania
    MS-Off Ver
    Excel 2010
    Posts
    95

    Re: Help: Numbers Frequency ?

    I really need that. It is not lottery checker it is about frequency. Any help, please ?

  4. #4
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Help: Numbers Frequency ?

    Your thread title is misleading, please change it so that it describes your problem more accurately.

    Frequency would be how often a number appeared, not when it last appeared.

  5. #5
    Registered User
    Join Date
    06-02-2012
    Location
    Romania
    MS-Off Ver
    Excel 2010
    Posts
    95

    Re: Help: Find the last appearence of a number ?

    Just changed it. Could you help m, please ?

    Thank you !

  6. #6
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Help: Find the last appearence of a number ?

    Kinda difficult to say exactly what will work without seeing the layout of your sheet.

    Looking at the table with the last 10 draws, would the most recent be at the top or bottom of the table?

  7. #7
    Registered User
    Join Date
    06-02-2012
    Location
    Romania
    MS-Off Ver
    Excel 2010
    Posts
    95

    Re: Help: Find the last appearence of a number ?

    The more recent should be at the bottom of the table.

  8. #8
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Help: Find the last appearence of a number ?

    Assuming that your table for last 10 draws is in A2:F11 and the 1st number of the 11th draw is in A13, if not adjust the ranges to suit, noting that the table range is absolute.

    =MIN(IF($A$2:$F$11=A13,{10;9;8;7;6;5;4;3;2;1}))

    Note that this is an array formula, copy the formula into the cell then hold down Shift and Ctrl and press enter. If the formula returns an error of #VALUE! then it means this has not been done correctly.

    Once the formula is entered correctly, use the fill handle to copy it to the right for the remaining numbers.

+ 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