+ Reply to Thread
Results 1 to 13 of 13

Find number difference 0 instead of number 1

  1. #1
    Registered User
    Join Date
    04-07-2015
    Location
    Vietnam
    MS-Off Ver
    Office 2013
    Posts
    89

    Find number difference 0 instead of number 1

    Dear everyone!
    I want to find all number difference 0 number in the table sheet to replace by one number 1
    Please help me what is the formula for that.
    example I attach file:
    Attached Files Attached Files

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

    Re: Find number difference 0 instead of number 1

    I am going to make some assumptions. First that you are wanting to change only the zeros highlighted. Second that the values were all manually input, so that there is no formula to change. Therefore my solution would be to select the range L2:AH35, on the Home tab choose Find&Select then Replace. In the box next to "Find what:" input the number 0, and in the box next to "Replace with:" input the number 1 and select "Replace All". If this is a part of a larger sheet then simply change the dimensions of the range.

  3. #3
    Registered User
    Join Date
    04-07-2015
    Location
    Vietnam
    MS-Off Ver
    Office 2013
    Posts
    89

    Re: Find number difference 0 instead of number 1

    Quote Originally Posted by JeteMc View Post
    I am going to make some assumptions. First that you are wanting to change only the zeros highlighted. Second that the values were all manually input, so that there is no formula to change. Therefore my solution would be to select the range L2:AH35, on the Home tab choose Find&Select then Replace. In the box next to "Find what:" input the number 0, and in the box next to "Replace with:" input the number 1 and select "Replace All". If this is a part of a larger sheet then simply change the dimensions of the range.
    No, you don't understand me.
    I want to replace 1 for other number difference 0 (excepted 0 number)
    example: 2 into 1; 3,5 into 1....

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Find number difference 0 instead of number 1

    show some sample answers please, and explain how you arrived at them please
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    04-07-2015
    Location
    Vietnam
    MS-Off Ver
    Office 2013
    Posts
    89

    Re: Find number difference 0 instead of number 1

    Quote Originally Posted by FDibbins View Post
    show some sample answers please, and explain how you arrived at them please
    my result many value >0 I want to change into 1 in the table.
    Maybe use code or not. It is Ok.

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

    Re: Find number difference 0 instead of number 1

    Quote Originally Posted by ninhmoon View Post
    I want to replace 1 for other number difference 0 (excepted 0 number)
    example: 2 into 1; 3,5 into 1....
    Then use the same process as I outlined above but in "Find what:" input 2 then select "Replace All", next change the input for "Find what:" to 3 and so on until all of the numbers, except the zeroes, used in the spreadsheet are changed to 1. OR select the entire range of cells, use conditional formatting, select "Format only cells that contain", "Cell value", "Greater than", "0". For the format select the "Number" tab, select "custom" and for "type:" input 1. press "OK", "OK", and "OK".

    Hope this gets the results you are looking for.
    Last edited by JeteMc; 06-26-2015 at 11:48 PM.

  7. #7
    Registered User
    Join Date
    04-07-2015
    Location
    Vietnam
    MS-Off Ver
    Office 2013
    Posts
    89

    Re: Find number difference 0 instead of number 1

    Quote Originally Posted by JeteMc View Post
    Then use the same process as I outlined above but in "Find what:" input 2 then select "Replace All", next change the input for "Find what:" to 3 and so on until all of the numbers, except the zeroes, used in the spreadsheet are changed to 1.
    I don't understand.
    When i use the find what with condition >0 to replace range("D10:AH80") example. but I can not find the my result
    when i use the code:
    Quote Originally Posted by ninhmoon
    Public Sub GPE()
    Dim Cll As Range
    For Each Cll In Selection
    If Cll.Value > 0 Then Cll.Value = 1
    Next Cll
    End Sub
    but I have trouble when I want to change the all sheets on the file.
    I dont know How should I do?
    Last edited by ninhmoon; 06-26-2015 at 11:51 PM.

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Find number difference 0 instead of number 1

    Provide some sample answers in your workbook, and show how you got them. That way, we dont have to guess what you want

  9. #9
    Registered User
    Join Date
    04-07-2015
    Location
    Vietnam
    MS-Off Ver
    Office 2013
    Posts
    89

    Re: Find number difference 0 instead of number 1

    Quote Originally Posted by FDibbins View Post
    Provide some sample answers in your workbook, and show how you got them. That way, we dont have to guess what you want
    My result for my workbook.
    Attached Files Attached Files

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Find number difference 0 instead of number 1

    Create a 2nd table, identical to the 1 you have (I started in column AL). Put this in AL9, and copy down and across the entire table.

    You can now either use that new table, or copy/paste values back over the 1st table, then delete the 2nd table

  11. #11
    Registered User
    Join Date
    04-07-2015
    Location
    Vietnam
    MS-Off Ver
    Office 2013
    Posts
    89

    Re: Find number difference 0 instead of number 1

    Quote Originally Posted by FDibbins View Post
    Provide some sample answers in your workbook, and show how you got them. That way, we dont have to guess what you want
    Quote Originally Posted by FDibbins View Post
    Create a 2nd table, identical to the 1 you have (I started in column AL). Put this in AL9, and copy down and across the entire table.

    You can now either use that new table, or copy/paste values back over the 1st table, then delete the 2nd table
    it waste a long time.
    I think so.
    If you use the code below I think it is better than your result.
    Because you know I must to make 22 sheets for one moth.
    So I can't create 2 table and copy and paste value after that I delete old table.

  12. #12
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Find number difference 0 instead of number 1

    OK well perhaps other members will have better ideas for you

  13. #13
    Registered User
    Join Date
    04-07-2015
    Location
    Vietnam
    MS-Off Ver
    Office 2013
    Posts
    89

    Re: Find number difference 0 instead of number 1

    Quote Originally Posted by FDibbins View Post
    OK well perhaps other members will have better ideas for you
    I think your idea is very better when I work with one sheet.
    thank very much. (Maybe I can not understand all idea you say because my English is not good )

+ 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. Formula to find difference with changing initial number?
    By klm1312 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 08-22-2014, 09:37 PM
  2. [SOLVED] How2 find number in range and return that number or if doesn't exist then the next highest
    By Crawfinator1 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 06-06-2014, 08:52 AM
  3. Replies: 5
    Last Post: 02-13-2014, 05:37 PM
  4. [SOLVED] To find any 4 digit number and return the same number with desired formating effect.
    By neo4u44 in forum Word Programming / VBA / Macros
    Replies: 3
    Last Post: 04-24-2012, 12:45 AM
  5. Replies: 7
    Last Post: 12-18-2008, 07:34 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