Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Help with Invalid cell value '#REF!' error

Hi there,

 

In Power Query Editor, is there a way to isolate the faulty cell responsible for the Invalid cell value '#REF!' error? I have removed errors & nulls and replaced values Error ->Null. I have also confirmed that there are no formulas/errors in the source sheets. The error is occuring when transposing a table from Rows to Columns. 

  • Hi Anonymous 

    Are you sure there are no errors in your source sheet?  Transposing a table won't create a #REF error. Such an error will be there in the source data.

    Try this:

    1. Duplicate your query

    2. Delete all steps except the Source & Navigation steps

    3. Close & Apply - this should result in a pop-up like this telling you there are errors in your query.

    4. Click on the View errors link in the yellow-highlighted section.

    5. This creates a new query in the PQ Editor that lists the errors in your query, including the row number where the error is

     

    6. Check the rows for your error(s).

     

    If that doesn't help you find the issue please supply your source data file.

     

    Regards

    Phil

5 Replies

  • Hi Anonymous 

    Are you sure there are no errors in your source sheet?  Transposing a table won't create a #REF error. Such an error will be there in the source data.

    Try this:

    1. Duplicate your query

    2. Delete all steps except the Source & Navigation steps

    3. Close & Apply - this should result in a pop-up like this telling you there are errors in your query.

    4. Click on the View errors link in the yellow-highlighted section.

    5. This creates a new query in the PQ Editor that lists the errors in your query, including the row number where the error is

     

    6. Check the rows for your error(s).

     

    If that doesn't help you find the issue please supply your source data file.

     

    Regards

    Phil

  • Anonymous's avatar
    Anonymous
    Not applicable

    Thanks very much PhilipTreacy . Indeed, as you allude to, it was an error in the source sheet. I was overlooking several #Value! errors and fixed this with a Replace -> 0 command. You suggest a good way of isolating the errors in question. Thanks again for your response.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Thanks Phil. Saved me a lot of effort with this solution. 🙂

  • Anonymous's avatar
    Anonymous
    Not applicable

    Your help solved my issue thanks. I had a strange one, where it turns out that a specific step was causing the error. 
    When my last step was "= Table.SelectRows(#"Expanded File", each ([Timestamp] <> null))", I would get the #'REF'! error described.
    When I remove that step, I no longer have the issue.
    Digging deeper, it seems that there were a couple of Error values in the Timestamp column.
    But could this really cause my query to break when I try and filter out null values?

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Long story short: Adding certain steps can cause errors to develop, and OP is correct that this can be solved by removing these steps