Changing Table Header Name w/o Making an Error in the Query

  • Dear Excel Gurus,




    Pardon one of your weaklings for asking your guidance on one of the quest to master Excel.


    As you probably know, you need to make a table to be able to use the Power Query function.
    I have lots of sheets with identical tables. Sheets are named based on my clients.


    I am currently stuck with one of the Power Query "setting" - changing the header's name of a table.
    Once I change it, the query goes error. I have to change it manually in the advanced editor menu.
    And it is a pain in the butt to do that one-by-one when you have more than 10 tables in the workbook.


    I have attached the example file for you.



    Please be the knight in the shining armor for me and help me solve this issue.





    Thank you.

  • I had no problem changing column headers either.

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

  • Unable to replicate your issue. I was able to change several column names without issue.


    Hello, there! Thank you for your time to reply my issue.
    It seems like you changed the column names IN the query itself but not the one in the sheet.


    e.g. You changed "Yellow" to "Orange". The header's name in the query is Orange but the one that you see on the sheet is still Yellow.



    Just to clarify, is that what you did or is my version of excel and/or power query too outdated compared to yours?



    Will be waiting for your feedback.
    Have a great day!

  • The header does not change in the original table. It changes in the query and then when you Close and Load the query to Excel, it will be changed in the output table.


    Well that is why I open this thread. I need to change the original table header's name, not the query.
    Is there a way to do fix this?


    If cannot, then is there a way to change all of the queries header's name? Not one query at a time. Selecting multiple queries and change the name header's name all at once.

  • Why not just change the header in the original Excel SpreadSheet. I am not sure I am understanding your situation.


    I can change the header in the original Excel Spreadsheet. But when I do that, the query will resulted in error like the example I gave you in the file.


    Let's say I made the "Red" in the original Excel Sheet and I made the query from that table.
    When I change "Red" to "Pink" in the original table, the query resulted in error because it's looking for the header called "Red" which I already changed to "Pink".
    To solve that error, I need to go to advanced editor in the query and manually change the "Red" to "Pink" (picture attached in the excel file).



    Is there a way to change the header in the Sheet without making an error in the query?

  • Are you changing the header after you have created the query? I think that this is the part we are not understanding clearly.


    In the original file, I changed one of the headers to read RED. I then clicked on the Refresh button twice and the query was updated without issue. Again, I am unable to replicate your issue.

  • Are you changing the header after you have created the query? I think that this is the part we are not understanding clearly.


    In the original file, I changed one of the headers to read RED. I then clicked on the Refresh button twice and the query was updated without issue. Again, I am unable to replicate your issue.


    Yes, I change the header of the original table after I have created the query.
    That's why the query turned into an error afterwards.

Participate now!

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