+ Reply to Thread
Results 1 to 10 of 10

find / replace single digits

  1. #1
    Registered User
    Join Date
    02-23-2019
    Location
    USA
    MS-Off Ver
    Version 2305
    Posts
    14

    find / replace single digits

    Hello.
    I've been using Excel, & loving it for years. Whenever I have been stumped on anything concerning it's abilities I have been able to ask others or stumble upon the answer eventually.
    This one has stymied me for a long time now.......
    I run a pool where people submit numbers (1-52) & when their numbers were drawn in the states LOTTO I delete that number from their list. The first person to have all of their numbers deleted wins. I use the find/replace, of course, to delete numbers 10-52. How can I set it up to delete the lower numbers = 01-09?
    In all my formatting efforts I have yet to find the right path to accomplish this. I can't imagine that it isn't possible.
    My "work around" has been to sort each column the highlight the string of entries & delete. Then move to the next column & repeat..etc. This is a pain, especially when I am confident that there is a better way.
    If I type in the "find" - 09 I am prompted to go to the options tab to narrow down my search.
    I have the cells formatted to "Custom" - "00" and in the sample it shows it as 09.
    I have tried (in "options") to "match case" "match entire cell contents" & every combination of those 2.
    It's not that I am such a busy man that I can't afford the extra time going thru the extra measures - it's just a PAIN.
    Thank you in advance for any help you may provide.
    (I am leaving this browser open & leaving the house for a while - so if you have questions & it looks like I am watching but not answering, that's why)

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,779

    Re: find / replace single digits

    Welcome to the forum!

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: find / replace single digits

    Hey Violator behind the grassy knoll, welcome to the forum,

    See the attached where I built you the game. Instead of 1-51, I put in the state abbreviations. See if this works for you. If not, tell me what should change. More picks? More Names? Validation dropdown of possible state names?

    Pick some states game.xlsm
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    02-23-2019
    Location
    USA
    MS-Off Ver
    Version 2305
    Posts
    14

    Re: find / replace single digits

    I have taken out all of the other tabs that I use to eliminate any personal data being shared.
    Column "A" is the nicknames people have given me. "B" - "I" are their chosen numbers & "K" is the remaining numbers.
    Presently, when the number 31 is to be deleted I go to "find / replace" - find all #31 & replace it with an empty cell. But when a single digit number is drawn I have to go through each (B-I) column to sort them then delete them. If I were to format the cell so there was no zero before the single digit then deleted 9, for example, I lose all of the nines (9, 19, 29, etc).
    I hope I am explaining this well enough.
    It's really a nice pool. I use the Illinois state "Lotto" numbers (1-52). When they draw the number & #-- is drawn it is taken from the sheet. They draw 6 numbers & everyone has 8 numbers to begin with. They pay just the once to get in & the game usually lasts about 2 months. I've been running this pool since 1999.
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,552

    Re: find / replace single digits

    This is a 'low tech' proposal.
    Place the date and lotto numbers in row 1.
    Populate each range of pool numbers using formulas similar to: =IF(ISERROR(MATCH(B2,$N$1:$S$1,0)),B2,"")
    As an option you could group the ranges of pool numbers as modeled in the attached copy of the file to make it easier to identify whose row wins.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  6. #6
    Registered User
    Join Date
    02-23-2019
    Location
    USA
    MS-Off Ver
    Version 2305
    Posts
    14

    Re: find / replace single digits

    Quote Originally Posted by JeteMc View Post
    Let us know if you have any questions.
    Thank you for your help.
    It's very possible that I am just not bright enough to follow your train of thought, but it's just as possible that I am not articulate enough to explain my own train of thought.
    I have attached another file that may help a little.
    I have tabs labeled;
    All entries -- this one is self-explanatory

    Jan 31 -- on Jan 31st the numbers 1-11-12-22-27-40 were all drawn & I need to take them out of the sheet. I took out the #1 last to show the way it was sorted & deleted.

    Feb 2 --- on Feb 2nd the numbers 7-11-36-39-43-50 were all drawn & I need to take them out of the sheet. If you click back & forth on the "all entries" & the "Feb 2" tab you can see all of the empty cells where they were deleted.

    Feb 2 copy sorted -- this is how I would present the current results to the people involved. It is sort alphabetically & then by the number of remaining numbers they have.

    On the 2nd the number 7 was drawn so I have to sort each column to delete all of those numbers. I would like to be able to treat the single digit numbers (01-09) like I do 10-52 ... meaning, going to "find/replace" & replacing the desired number with an empty cell. I would like to eliminate the need to sort each column to delete them.
    Attached Files Attached Files

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,552

    Re: find / replace single digits

    Not to worry. Lets see if this is helpful for the Jan 31 and Feb 2 sheets. If so we'll then attempt to replicate the Feb 2 copy sorted sheet.
    Note that on the Jan 31 and Feb 2 sheets I placed the formula based proposal in columns M:W so that it could be compared to what is already there.
    First the order of the names will need to remain the same as on the All entries sheet so column M on both sheets is populated using: ='all entries'!A1
    On the Jan 31 sheet N1:U188 are populated using: =IF(ISERROR(MATCH('all entries'!B1,$N$190:$S$190,0)),'all entries'!B1,"")
    W1:W188 are populated using: =COUNT(N1:U1)
    On the Feb 2 sheet N1:U188 are populated using: =IF(ISERROR(MATCH('Jan 31'!N1,$N$190:$S$190,0)),'Jan 31'!N1,"")
    Note that the lottery numbers for each sheet are on row 190.
    Let us know if you have any questions.
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,552

    Re: find / replace single digits

    Please adhere to forum rule #8.
    I understand that you are attempting to do all of your deletions through the find and replace feature and that the single digit numbers are the ones that are causing the problems. In my opinion there is no way to format the numbers such that what you want to do can be accomplished. Formatting only affects the way a number is displayed not the actual value in the cell. If you select a cell that is displaying 03 and look in the formula bar, you will see that 3 is what is actually in that cell. When you attempt to find and replace 3 the feature will also find and replace the 3 in 30:39, 13, 23, and 43.
    I further understand that when you get ready to show the updated results you want to rank by count of unmatched numbers remaining and to have all unmatched numbers pushed to the left side of the table. As stated in post#7 the "copy sort sheet" is something we can attempt to replicate after establishing that the formula is correctly deleting the matches.
    In the file attached to post #7 look at 1 in a million's entries and notice that the first number is a 1. Since 1 is one of the numbers drawn in the Jan 31 lottery it was deleted from 1 in a million's number list on the Jan 31 sheet. further note that it is still deleted when looking at the Feb 2 sheet.
    If you have spotted something that the formula is doing wrong, please cite cell and sheet reference so that I may attempt to correct the issue.
    I will be away for a while so I will likely not respond until the early part of next week.
    Let us know if you have any questions.

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,552

    Re: find / replace single digits

    To show that formulas can produce the same end result as the method you are now using take a look at the Feb 2 copy sorted sheet, columns M:W
    Column M is populated using: =INDEX('Feb 2'!M$1:M$188,AGGREGATE(15,6,ROW('Feb 2'!A$1:A$188)/('Feb 2'!W$1:W$188=W1),COUNTIFS(W$1:W1,W1)))
    Columns N:U are populated using: =IFERROR(INDEX($X1:$AE1,AGGREGATE(15,6,(COLUMN($X1:$AE1)-COLUMN($W1))/($X1:$AE1<>""),COLUMNS('Feb 2'!$A1:A1))),"")
    Column W is populated using: =SMALL('Feb 2'!W$1:W$188,ROWS(W$1:W1))
    Columns X:AE are populated using: =INDEX('Feb 2'!N$1:N$188,MATCH($M1,'Feb 2'!$M$1:$M$188,0))
    Note that columns X:AE may be moved and/or hidden for aesthetic purposes.
    Let us know if you have any questions.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    02-23-2019
    Location
    USA
    MS-Off Ver
    Version 2305
    Posts
    14

    Re: find / replace single digits

    Quote Originally Posted by JeteMc View Post
    In my opinion there is no way to format the numbers such that what you want to do can be accomplished.
    And there it is.
    That was my main objective, to find out if that was possible. As far as any / all of the other stuff there wasn't really any problems. Paring down the rows, and any of the sorting - no issues. The only real question I was looking for help with has now been answered. Thank you.

+ 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] How to subtract single cells with double digits into a single digit of a single cell.
    By greenfox74 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 03-11-2021, 02:05 AM
  2. [SOLVED] Using find replace to first find two double quotes and replace with a single double quote
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-17-2015, 10:13 AM
  3. [SOLVED] Find a series of digits within a string and replace
    By misha4334 in forum Excel General
    Replies: 8
    Last Post: 03-02-2015, 02:05 PM
  4. LOTTERY FILTER#6, Find,Sort Roots for each digits, Single Cell w/ dash
    By david gonzalez in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 03-10-2014, 03:55 AM
  5. [SOLVED] LOTTERY FILTER#5, Find each Gap bewtween Digits, Single Cell w/ dash
    By david gonzalez in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-05-2014, 09:51 PM
  6. .Find problem when the found range's rows go from single to double digits
    By alsega in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-13-2012, 11:21 AM
  7. [SOLVED] Find/Replace last couple of digits on number
    By gardenhead in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-28-2006, 03:10 PM

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