+ Reply to Thread
Results 1 to 3 of 3

Re-arrange Data & Insert blank row (Formula or Power Query?)

  1. #1
    Registered User
    Join Date
    08-16-2013
    Location
    India
    MS-Off Ver
    Office 365 (Monthly Targeted Channel)
    Posts
    26

    Re-arrange Data & Insert blank row (Formula or Power Query?)

    I don't know how exactly to post the query. So here is what data looks like.
    Excel-Query2.jpg
    Incase image doesnt show up, View it here

    This is basically a regular updating salary register. And for printing purpose I am expecting result like this.
    Excel-Query2a.jpg
    Incase image doesnt show up, View it here

    As you can see, Unit name as Heading and whoever worked in that unit should be in that list then another heading of another Unit and whoever worked there.

    Header Row (Sr,Name, Bank & Acc No, etc etc) is not important. I could put this row at top and repeat it with print tiles.

    Space of 2 blank rows between two unit tables should be there.

    Somehow I managed to achieve expected results by making helper sheet (where i assumed that maximum names in that unit would be 55) and then another worksheet with auto-filter remove blanks VBA. Its complicated.

    I want some kind of formula based OR power query based solution for this. Its regular updating sheet, Units can increase or decrease, Number of names can increase or decrease every other month.

    I understand, I wasn't able to describe my query perfectly but you will get a rough idea by looking at given images.

    I am using office 365 (monthly targeted) fully updated version so all the dynamic array formulas available with me.

    Feel free to play with sample sheet. Download Sample Sheet From Here

    I think POWER QUERY can do this, but i dont know how.

    Thanks

  2. #2
    Registered User
    Join Date
    08-16-2013
    Location
    India
    MS-Off Ver
    Office 365 (Monthly Targeted Channel)
    Posts
    26

    Re: Re-arrange Data & Insert blank row (Formula or Power Query?)

    Here is how i achieved the desired result.

    1. Helper Sheet created. In a column i used formula =Unique(SR[Unit]) to get all the unique entries of UNIT column.
    2. Created a table like design (Not excel official table, because dynamic array formulas are not supported in excel table) and used formula =FILTER(SR[[Unit]:[Status]],SR[Unit]=F2) Here F2 is the first row of Unique list mentioned in step 1.
    3. I assumed that maximum NAMES in a table (mentioned in step 2) would be 55. (it can be more in future, thats why i am looking for some other solutions)
    4. This way i created all the tables (about 50) and added TOTAL row manually.
    5. Created another sheet (PRINT) and adjusted required data and column widths etc. Please UNHIDE HELPER1 SHEET in sample sheet for a better idea
    6. Then used filter to remove blanks. Done
    7. I used VBA code (to unprotect, refresh, filter blanks and then protect again) in PRINT sheet. PASSWORD is 911

    Used tons of formulas and tricks to achieve desired result, but this makes my sheet bulky and slow. I am looking for an easy way to achieve the same. Now am trying hands in power query. Lets see. Any help would be great.
    Thanks

  3. #3
    Registered User
    Join Date
    08-16-2013
    Location
    India
    MS-Off Ver
    Office 365 (Monthly Targeted Channel)
    Posts
    26

    Re: Re-arrange Data & Insert blank row (Formula or Power Query?)

    bump, any body ?

+ 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] Blank cells in Power Query, data existing in original source
    By kirootsouthpark in forum Excel General
    Replies: 4
    Last Post: 08-25-2020, 05:05 PM
  2. If paramater in Power Query is blank do not filter
    By Harveyhirst1 in forum Excel General
    Replies: 3
    Last Post: 09-18-2018, 06:59 PM
  3. Sub-Forum for Excel Power Tools (Power Query, Power Pivot & Power BI)
    By chullan88 in forum Suggestions for Improvement
    Replies: 10
    Last Post: 06-28-2018, 02:25 PM
  4. [SOLVED] Insert a date value as a Custom Column in Power Query
    By heytherejem in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 03-28-2018, 12:42 PM
  5. Replies: 2
    Last Post: 12-08-2017, 03:13 PM
  6. Data transformation using Formula or Power Query
    By chullan88 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 11-18-2017, 09:59 AM
  7. [SOLVED] Change data structure using Formula or Power Query ( Get & Transform)
    By chullan88 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-04-2017, 02:58 AM

Tags for this Thread

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