+ Reply to Thread
Results 1 to 7 of 7

Lottery numbers

  1. #1
    Registered User
    Join Date
    10-10-2004
    Posts
    18

    Lottery numbers

    I want to enter each lottery number into a seperate cell, then on a different row enter the winning numbers. Then have all the numbers we bought that were already entered earlier would change color to red if they match the winning numbers. Please help.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    This does something close.

    Let me know if you still want your version

    VBA Noob
    Attached Files Attached Files
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Contributor
    Join Date
    07-05-2006
    Location
    Canada
    MS-Off Ver
    2003, 2007
    Posts
    581
    Format -> Conditional Formatting

    Select all the cells you want to test.

    Know the location of the winning numbers. I'll assume the winning numbers are in A25:F25.

    Note the highlighted cell address (should be in the top left on your screen). I'll assume it's A2. (If you don't use the active cell address, it will mess up the colouring signficantly)

    Use the formula:

    =IF(ISERROR(MATCH(A2,$A$25:$F$25,0)),FALSE,TRUE)

    And adjust your color to red.

    Scott

  4. #4
    Registered User
    Join Date
    10-10-2004
    Posts
    18

    Conditional Formatting

    Where do I put the formula?

  5. #5
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    My spread no good ??

    Try this link re conditional formatting

    http://www.contextures.com/xlCondFormat01.html

    VBA Noob

  6. #6
    Registered User
    Join Date
    10-10-2004
    Posts
    18

    Lottery

    Yes, it is, but I need to hav the six number show up if it matchs as the mega number

  7. #7
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,719
    Quote Originally Posted by Donald
    Where do I put the formula?
    Format > Conditional Formatting

    Choose "formula is" from dropdown in left hand box and put the formula in the other box

    Hit "format" button and choose red pattern,

    this formula is sufficient

    =MATCH(A2,$A$25:$F$25,0)

+ 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