Forum Discussion

Gord0462's avatar
Gord0462
Copper Contributor
Dec 23, 2020

Find & Select

Is it possible to have the default in Find set to Values instead of Formulas

5 Replies

  • JMB17's avatar
    JMB17
    Bronze Contributor

    Gord0462 

     

    You could use a macro that invokes a built-in dialog and set that argument to find values. The downside is it doesn't have all of the options (find formats and scope) and it doesn't appear to limit the search to the range you've selected before invoking the dialog - it appears to search the entire sheet regardless.

     

    Sub ShowFindDialog()
         '//  arg1   What            text to find
         '//  arg2   LookIn          formulas (1) or values (2) or comments (3)
         '//  arg3   LookAt          whole cells (1 or xlWhole) or part (2 or xlPart)
         '//  arg4   SearchOrder     xlByRows  (1) or xlByColumns (2)
         '//  arg5   SearchDirection xlNext (1) or xlPrevious (2)
         '//  arg6   MatchCase       True or False
         '//  arg7   MatchByte       True or False
         
         Application.Dialogs(xlDialogFormulaFind).Show arg2:=2
         
    End Sub
    
  • adversi's avatar
    adversi
    Iron Contributor

    Gord0462 

    If you mean finding exact values that make up the entire cell (without formulas), you can check the Match entire cell contents

     

    • Gord0462's avatar
      Gord0462
      Copper Contributor

      Yes but I don't usually look for cells containing part of a cell. I would search dining if I wanted to see all the dining tables, chairs, and benches in this file. I want to know if it is possible for the default in the "Look In" box to be Values 

      Thanks

      adversi 

Resources