+ Reply to Thread
Results 1 to 3 of 3

Thread: Better "Find" Function for numbers on a worksheet.

  1. #1
    Registered User
    Join Date
    01-07-2012
    Location
    Calhan, CO
    MS-Off Ver
    Excel 2010
    Posts
    1

    Better "Find" Function for numbers on a worksheet.

    I have a very large worksheet with purchases annotated and when I try to reconcile with a Account system (manually) it is hard to manually search for a number when trying to match. The problem with the "find" function is it will only digest whole number, if I enter 41.23 it tells me it doesn't exist yet I know it does so it forces me to scan manually for the number. Is there a macro I could run that would do a better job of searching or finding a number with decimal places?

  2. #2
    Valued Forum Contributor dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    New Delhi, India
    MS-Off Ver
    Excel 1997, 2000, XP, 2003, 2007, 2010
    Posts
    2,406

    Re: Better "Find" Function for numbers on a worksheet.

    Hi robin,

    Welcome to the forum.

    I have just checked that if you find (Ctrl+F) 41.23 it will find all the below numbers:-

    41.23
    41.234
    41.23454645
    67.41.23565


    I believe you are struggling because of number formatting, would suggest you to share the sample file. Thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey
    +919810929744
    dilipandey@gmail.com

  3. #3
    Valued Forum Contributor
    Join Date
    12-05-2011
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2007
    Posts
    213

    Re: Better "Find" Function for numbers on a worksheet.

    Hi

    The issue may be that you are looking for values, not formulae i.e. you can search for 41.23 when that value is typed in, however, if it is the result of a calculation, the default search won't find it. Excel's default search is to look in the cell formula, not the cell value. The same applies to rounding i.e. your 4.23 is actually 4.228. Values will find 4.23, even though it is rounded, Formula won't.

    You need to go to press the 'Options' button in the Search dialogue box, and change 'Look In' to 'Values'.

    To avoid doing this each time, you could set up a macro. I don't know how familiar you are with macros, and whether you want this function available in all spreadsheets or just a specific one. This would determine how you implement it. You could create an add-in, then have the function always available, or simply add it to the one spreadsheet and assign a hotkey to it, so that it is easy to access in that spreadsheet.

    The macro would be:
    
    Sub FindValue()
    
    Dim strSearch As String
    
    strSearch = InputBox("Text to find")
    If strSearch = "" Then End
    
    Cells.Find(What:=strSearch, After:=ActiveCell, LookIn:=xlValues, LookAt:= _
            xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
            , SearchFormat:=False).Activate
            
    End Sub
    Cheers, Rob.

+ 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.2.0