+ Reply to Thread
Results 1 to 10 of 10

Lottery Filter#2, Low/High Digits, in Single CELL with "-"

  1. #1
    Forum Contributor
    Join Date
    10-21-2012
    Location
    miami, florida usa
    MS-Off Ver
    Excel 2007
    Posts
    260

    Lottery Filter#2, Low/High Digits, in Single CELL with "-"

    Hi,

    How i do, i'm trying to apply some lottery filters on a Tickets that i'm producing on daily basis,
    (i know many on them)

    this filter i Called "Low/High"

    For example :

    1-.the Lottery have number is 36 (lowest 1, Highest 36)

    2-.the 36 Numbers are Identified as two section (Low= 1~18), and (High=19~36)

    3-.In order to Filter out "bad combination", the Array Formula (if any) should
    a-.identify / count how many numbers are from LOW and
    b-.how many numbers are HIGH

    Note :
    Combination are in a single CELL,
    Combination are with "-" e.i ( 01-02-03-04-05 )
    Combination are with 2 digits e.i ( 01-02-03-04-05 )


    Example :

    Please Login or Register  to view this content.
    please I need to get L/H on Column J

    Is there a way to do this with function formula?


    Thanks YOU ALL.

    David.
    Last edited by david gonzalez; 10-15-2013 at 12:04 AM. Reason: wrong input, sorry, my fault

  2. #2
    Forum Contributor
    Join Date
    10-01-2013
    Location
    Cameron, Mo
    MS-Off Ver
    Excel 2010
    Posts
    113

    Re: Lottery Filter#2, Low/High Digits, in Single CELL with "-"

    Try this in your J row cells

    =IF(INT(LEFT(G1,2))<19,1,0)+IF(INT(MID(G1,4,2))<19,1,0)+IF(INT(MID(G1,7,2))<19,1)+IF(INT(MID(G1,10,2))<19,1,0)+IF(INT(RIGHT(G1,2))<19,1,0)&"/"&(5-(IF(INT(LEFT(G1,2))<19,1,0)+IF(INT(MID(G1,4,2))<19,1,0)+IF(INT(MID(G1,7,2))<19,1)+IF(INT(MID(G1,10,2))<19,1,0)+IF(INT(RIGHT(G1,2))<19,1,0)))

    It is long sorry!

  3. #3
    Registered User
    Join Date
    10-14-2013
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2003, 2013
    Posts
    25

    Re: Lottery Filter#2, Low/High Digits, in Single CELL with "-"

    I would think a simpler way of doing it would be via your own user function or by first splitting the cells into columns eg. column H to L would be the individual numbers (use MID). However if you really want to do it with a single formula try:

    =SUM(IF(INT(MID(G6,1,2))<=18,1,0)+IF(INT(MID(G6,4,2))<=18,1,0)+IF(INT(MID(G6,7,2))<=18,1,0)+IF(INT(MID(G6,10,2))<=18,1,0)+IF(INT(MID(G6,13,2))<=18,1,0)) & "/" & SUM(IF(INT(MID(G6,1,2))>18,1,0)+IF(INT(MID(G6,4,2))>18,1,0)+IF(INT(MID(G6,7,2))>18,1,0)+IF(INT(MID(G6,10,2))>18,1,0)+IF(INT(MID(G6,13,2))>18,1,0))

    basically just separates out each number using MID and will do a count if <=18 then if > 18

    Apologies, did not refresh before answering the question, already answered above
    Last edited by NigelFrost; 10-15-2013 at 01:34 AM. Reason: already answered above did not see solution posted while editing

  4. #4
    Forum Contributor
    Join Date
    10-01-2013
    Location
    Cameron, Mo
    MS-Off Ver
    Excel 2010
    Posts
    113

    Re: Lottery Filter#2, Low/High Digits, in Single CELL with "-"

    Funny how much the 2 formulas are alike...lol!

  5. #5
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Lottery Filter#2, Low/High Digits, in Single CELL with "-"

    Or:

    =REPLACE(TEXT(SUM(ABS(10^{2,0}*((1+LEN(G6)-LEN(SUBSTITUTE(G6,"-","")))*{0,1}-SUMPRODUCT(--((--TRIM(MID(SUBSTITUTE(G6,"-",REPT(" ",255)),255*(ROW(INDIRECT("1:"&1+LEN(G6)-LEN(SUBSTITUTE(G6,"-",""))))-1)+1,255)))<=18))))),"000"),2,1,"/")

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  6. #6
    Forum Contributor
    Join Date
    10-21-2012
    Location
    miami, florida usa
    MS-Off Ver
    Excel 2007
    Posts
    260

    Re: Lottery Filter#2, Low/High Digits, in Single CELL with "-"

    Hi Mr NigelFrost,

    Thank you so much, it work perfect.


    Thank you

    David

  7. #7
    Forum Contributor
    Join Date
    10-21-2012
    Location
    miami, florida usa
    MS-Off Ver
    Excel 2007
    Posts
    260

    Re: Lottery Filter#2, Low/High Digits, in Single CELL with "-"

    Hi Mr Motu040602,

    For some reason i'm getting #VALUE message,
    I copied the string in G6 (and i replaced G1 for G6)

    i appreciated a lot, don't worry its working with this Array :
    Please Login or Register  to view this content.
    Best Regards

    David

  8. #8
    Forum Contributor
    Join Date
    10-21-2012
    Location
    miami, florida usa
    MS-Off Ver
    Excel 2007
    Posts
    260

    Re: Lottery Filter#2, Low/High Digits, in Single CELL with "-"

    Hi Mr XOR LX,

    Thank you, it worked !!!


    Best regards

    David

  9. #9
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Lottery Filter#2, Low/High Digits, in Single CELL with "-"

    You're welcome.

  10. #10
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Lottery Filter#2, Low/High Digits, in Single CELL with "-"

    Here's another one...

    Data Range
    G
    H
    I
    J
    5
    -----
    -----
    -----
    6
    22-33-34-35-36
    160
    7
    0/5
    7
    08-28-29-30-35
    130
    4
    1/4
    8
    01-18-23-33-35
    110
    2
    2/3

    Entered in J6 and copied down:

    =SUM(--(--MID(G6,{1,4,7,10,13},2)<=18))&"/"&SUM(--(--MID(G6,{1,4,7,10,13},2)>=19))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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. [SOLVED] Lottery Filter#1, SUM in Single CELL with "-"
    By david gonzalez in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 10-15-2013, 12:00 PM
  2. [SOLVED] Count "A" and "V" as separate characters in a single cell
    By sportboy712 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-04-2013, 12:26 PM
  3. Replies: 2
    Last Post: 09-25-2012, 12:53 AM
  4. Replies: 2
    Last Post: 08-02-2011, 06:57 AM
  5. Macro that runs entered value through "low" and "high" range
    By Vika.F in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-14-2005, 03:35 AM

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