"run time error 1004 method match property of the worksheetfunction class

  • I'm facing the problem "run time error 1004 method match property of the worksheetfunction class" trying to find a solution. But I don't understand very much about VBA. Please suggest me how to fix it. thank you

  • Explain what you are doing and what these variables are populated with


    Code
     Dim sColumn As String 'To store the column selection
        Dim sValue As String 'To hold the search text value

    An example workbook might help.

  • Code
     iColumn = Application.WorksheetFunction.Match(sColumn, shDatabase.Range("A1:L1"), 0)

    iColumn is declared as an integer, but the formula will not return an integer.


    I think you are looking for a specific column in the header row. If you are then use the FInd method which will return a cell and from that get the column number.


    Also, put the code into the UserForm not a Module.

  • Code
     iColumn = Application.WorksheetFunction.Match(sColumn, shDatabase.Range("A1:L1"), 0)

    iColumn is declared as an integer, but the formula will not return an integer.


    I think you are looking for a specific column in the header row. If you are then use the FInd method which will return a cell and from that get the column number.


    Also, put the code into the UserForm not a Module.


    I'm not very knowledgeable in VBA. would be greatly appreciated If you can help me fix it in a submission that I don't know. thank you very much

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!