+ Reply to Thread
Results 1 to 12 of 12

Resorting / Reformatting data in columns to different layout

  1. #1
    Spammer
    Join Date
    11-21-2014
    Location
    California
    MS-Off Ver
    2010
    Posts
    387

    Resorting / Reformatting data in columns to different layout

    I have attached a sample sheet with Raw data on it, as well as How I want to have the data resorted. Basically, tracking a customer through a sales cycle, and I want to be able to see if they hit certain stages (the sort column)

    So I am trying to figure out how to generate a listing of a customer number, customer name, and then an "x" (or whatever) in the appropriate box so that i know they have hit that state.

    A company may appear more than once in the same stage... (for example Company A has Sort A twice..... if that happens, only one mark is needed in Column M, and that company needs to appear only once).

    A company may not hit all of the stages in order as well.

    The sample sheet has raw data in columns A through D

    Columns K through Q, is how I would want it to look.

    Any help/thoughts are greatly appreciated

    **** Update ****

    Column B will contain a date that the last customer hit a certain stage. If there is a way to pull only the most recent date that the customer hit that part of the cycle, that would be awesome... if not, it is not a big deal.
    Attached Files Attached Files
    Last edited by snuffnchess; 05-11-2016 at 01:23 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    01-08-2011
    Location
    Portsmouth, England
    MS-Off Ver
    Excel 2007 to 2016
    Posts
    456

    Re: Resorting / Reformatting data in columns to different layout

    It doesn't solve your last request, but as a very visual solution I've attached a potential solution.

    This uses a pivot table combined with conditional formatting to display each customer with the "Sorts" they have achieved. If you click on the pivot table you will see which fields I've used for the rows and columns. I made the format tabular (see Report Layout button under Pivot Table Tools/Design). The main pivot table gives a count of each occurrence of sort achieved for each customer. I then used conditional formatting with a formula to say that if the cell value is >0, make the font and fill colour the same. The numbers are still there, but just not visible, so you could still use them in other formulas or calculations if you wanted.

    Hope that helps
    Attached Files Attached Files

  3. #3
    Spammer
    Join Date
    11-21-2014
    Location
    California
    MS-Off Ver
    2010
    Posts
    387

    Re: Resorting / Reformatting data in columns to different layout

    This is awesome. THank you!

    I tried setting up the pivot table to the actual workbook it will be used in.... How do I change the data source for a pivot table??? (note I have NEVER used a pivot table in my life)

  4. #4
    Valued Forum Contributor
    Join Date
    01-08-2011
    Location
    Portsmouth, England
    MS-Off Ver
    Excel 2007 to 2016
    Posts
    456

    Re: Resorting / Reformatting data in columns to different layout

    Ah so you've yet to discover the joy of pivot tables :-)

    To change the source, click anywhere on the pivot table. On the ribbon you will now see two new tabs - Analyze and Design. Click on the Analyze tab and choose the "Change Data Source" option. You will now see a dialog box where you can change the range of your data. Select the range and click OK.

    You will also need to use the "Refresh" option alongside the Change Data Source button when you change things in your raw data.

    Once you've got it set up in your live workbook, if you need any help with the conditional formatting or pivot layout just respond to this thread and I'll help you with that as well
    Last edited by shirleyxls; 05-11-2016 at 02:23 PM.

  5. #5
    Spammer
    Join Date
    11-21-2014
    Location
    California
    MS-Off Ver
    2010
    Posts
    387

    Re: Resorting / Reformatting data in columns to different layout

    Thanks! I got it working (so it seems).

    Now to get the Pivot table refresh into the Macro that generates that list it and it will be perfect.

    Thanks again!

  6. #6
    Valued Forum Contributor
    Join Date
    01-08-2011
    Location
    Portsmouth, England
    MS-Off Ver
    Excel 2007 to 2016
    Posts
    456

    Re: Resorting / Reformatting data in columns to different layout

    Put this in an appropriate place in your code (presumably somewhere after it generates the data list):

    Please Login or Register  to view this content.
    That will refresh all the pivot tables in the workbook... in case you feel like adding some more now you've discovered them

  7. #7
    Spammer
    Join Date
    11-21-2014
    Location
    California
    MS-Off Ver
    2010
    Posts
    387

    Re: Resorting / Reformatting data in columns to different layout

    Thanks!!! I really appreciate your help.

    Final question, and I'll leave you alone for a while)

    Is there a way to rearrange the order the columns appear in the pivot table? It seems that it just goes down column A, and the order in which data appears in Column A, is the order the header row displays the info. So for example, one of the column headings is "Activation".... well in the export data, that appears 4th.... out of 5. But I would like it to appear 5th in the header row..... does that make sense??

  8. #8
    Spammer
    Join Date
    11-21-2014
    Location
    California
    MS-Off Ver
    2010
    Posts
    387

    Re: Resorting / Reformatting data in columns to different layout

    Update: I set the macro that pulls the raw data so that it would sort the data before it goes into the pivot table... and the columns are still not appearing in the correct order.....

    I see them as columns 1, 2, 4, 5, 3

    Is there a way to manually force the column order???

  9. #9
    Valued Forum Contributor
    Join Date
    01-08-2011
    Location
    Portsmouth, England
    MS-Off Ver
    Excel 2007 to 2016
    Posts
    456

    Re: Resorting / Reformatting data in columns to different layout

    Wasn't ignoring you... just went to get food. It's a bit later here in England

    You can change the columns in a pivot table to be in whichever order you want. Click on the column you want to move then hover the cursor until you get the black cross (the one with the arrows on the points - sure it must have a technical name but don't know what it is!). You can then click and drag the column to another position... it shows as a narrow bar so you can see where it's going.

    If you've ever used Excel tables, it's the same way as you drag table columns about.

    Give it a try and let me know how you get on. Shout out if you need more help

  10. #10
    Spammer
    Join Date
    11-21-2014
    Location
    California
    MS-Off Ver
    2010
    Posts
    387

    Re: Resorting / Reformatting data in columns to different layout

    YOU. ARE. AWESOME.

    Thank you.

  11. #11
    Valued Forum Contributor
    Join Date
    01-08-2011
    Location
    Portsmouth, England
    MS-Off Ver
    Excel 2007 to 2016
    Posts
    456

    Re: Resorting / Reformatting data in columns to different layout

    Thank you for that very positive feedback It was a pleasure to help



    Excel is a constant learning process and it's great to help each other. If I've helped you today, a click on the star on the left is appreciated.

  12. #12
    Spammer
    Join Date
    11-21-2014
    Location
    California
    MS-Off Ver
    2010
    Posts
    387

    Re: Resorting / Reformatting data in columns to different layout

    Shirley... one more thing, and I will leave you along.... (i promise).

    The source of the pivot table shows all of columns A:D.... yet when the data in A:D expands (ie more customer data is added, the pivot table does not expand in rows....

    When i Expanded the Customer number from 45 unique values to 349 unique values.... the pivot table should show AT minimum 349 rows.... yet it still does not update. How do I fix this???


    ****EDIT**** I played with the filters at the top of the table and what showed as visible and not... and then my question was answered... thank you again!
    Last edited by snuffnchess; 05-12-2016 at 12:39 PM.

+ 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] Tips for reformatting layout of extracted Excel files
    By trolle in forum Excel General
    Replies: 3
    Last Post: 01-20-2016, 05:09 PM
  2. Replies: 1
    Last Post: 10-04-2011, 10:30 AM
  3. Reformatting row data to columns
    By Charlie_C in forum Excel General
    Replies: 9
    Last Post: 10-05-2010, 10:57 AM
  4. Reformatting columns, creating files, and totalling organized data
    By madfrog in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 09-13-2010, 06:36 AM
  5. Help reformatting block data into standard columns
    By dylanemcgregor in forum Excel General
    Replies: 8
    Last Post: 06-03-2009, 02:03 PM
  6. REformatting the data from columns to rows
    By kelleybr in forum Excel General
    Replies: 1
    Last Post: 09-06-2007, 12:00 AM
  7. Resorting Data- Help!!
    By eide0084 in forum Excel General
    Replies: 1
    Last Post: 08-12-2005, 04:05 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