+ Reply to Thread
Results 1 to 4 of 4

Remove Text from Headers - PowerQuery

  1. #1
    Forum Contributor
    Join Date
    10-06-2017
    Location
    Europe
    MS-Off Ver
    2013
    Posts
    123

    Remove Text from Headers - PowerQuery

    Hello all,

    I have a big table (around 4000 columns) with a header that looks like this:

    Date l Req - Apple l Del - Apple l Hours - Apple l Time - Apple l Req - Carrot l Del - Carrot l Hours - Carrot l Time - Carrot l Req - Carrot l Del - Orange l Hours - Orange l Time - Orange

    I am using power query to import ALL "Req" columns in one REQ sheet, ALL "Del" columns in another DEL sheet, ALL "Hours" columns in another HOURS sheet and ALL "Time" Columns in another TIME sheet

    So in the end i will have 4 sheets (REQ, DEL, HOURS, TIME) that should have the following header:
    Date l REQ - Apple l REQ - Carrot l REQ - Orange ...etc

    Is there any chance i could use a formula in power query in order to remove "REQ - " from header, when loading the data to table, in order to look like this:

    Date l Apple l Carrot l Orange

    Thank you

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,874

    Re: Remove Text from Headers - PowerQuery

    In PQ Editor
    Use Headers As First Row
    Highlihgt your Columns
    Replace Req with nothing
    Use First Row as Headers

    Found on the Transform Tab
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Contributor
    Join Date
    10-06-2017
    Location
    Europe
    MS-Off Ver
    2013
    Posts
    123

    Re: Remove Text from Headers - PowerQuery

    Thank you so much Alan
    It was so simple...
    The only thing i did beside what you said was to convert all the columns from whole number to text, replace the REQ, use first row as hearders and then convert again text to values.

    Best regards

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,874

    Re: Remove Text from Headers - PowerQuery

    Glad to hear it worked for you and thanks for the Rep

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] How to Remove Header Rows on a PowerQuery Excel Worksheet
    By Doofus1 in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 11-24-2019, 03:32 AM
  2. Replies: 2
    Last Post: 11-13-2019, 06:17 PM
  3. [SOLVED] formula for multiple split headers of text and numbers to respective headers
    By JEAN1972 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-19-2017, 10:17 AM
  4. Remove rows of text using PowerQuery?
    By nobodyukno in forum Excel General
    Replies: 1
    Last Post: 01-13-2017, 11:58 AM
  5. Remove rows of text using PowerQuery?
    By nobodyukno in forum Excel General
    Replies: 2
    Last Post: 01-13-2017, 11:56 AM
  6. Remove rows of text using PowerQuery?
    By nobodyukno in forum Excel General
    Replies: 0
    Last Post: 01-13-2017, 11:41 AM
  7. [SOLVED] Import a text file using VBA and Remove the Duplicate headers.
    By zaska in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 03-26-2014, 08:15 PM

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.6.0 RC 1