+ Reply to Thread
Results 1 to 5 of 5

CrossTab list or Arrays???

Hybrid View

  1. #1
    Registered User
    Join Date
    06-11-2013
    Location
    Toronto
    MS-Off Ver
    2013
    Posts
    25

    CrossTab list or Arrays???

    Good day to all,

    I have this list (small sample presented) in Excel 2013

    The list needs to be transformed/transposed in order to build named ranges for a Cascading Lookup Function (up to 64 ranges - "Locations") - i.e. the cells filled with colour

    Here's a small sample: Workbook1.xlsx.

    Wondering what the best method is here.

    Thanks!
    Attached Images Attached Images
    Last edited by vhache; 02-17-2014 at 03:52 PM. Reason: Specified Excel Version

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: CrossTab list or Arrays???

    Hi and welcome to the forum

    Please do not upload a picture of your file...rather, upload a sample of your workbook, showing what data you are working with, a few samples of your expected outcome is (manually entered is ok) and how you arrived at that. (exclude sensitive info). Pictures are pretty much impossible to edit, and no-one wants to re-type your data for you Also, not all members can upload picture files (Company firewalls and stuff)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: CrossTab list or Arrays???

    Yeah, retyping data makes Hulk angry.

    I did this with a few array formulas. Assuming your dataset was in A1:B8,



    I plopped this into E1:

    =IFERROR(INDEX($A$1:$A$8,MATCH(0,COUNTIF($D1:D1,$A$1:$A$8),0)),"") and copied over (to create headers)

    E2:

    =IFERROR(INDEX($A$1:$A$8,MATCH(0,COUNTIF($E$1:E1,$A$1:$A$8),0)),"") and copied down (to create location list)

    F2:

    =IFERROR(INDEX($B$2:$B$8,SMALL(IF($A$2:$A$8=F$1,ROW($B$2:$B$8)-ROW(A$2)+1),ROW(A1))),"") copied down and over for the rest


    Array formulas are confirmed with Ctrl+Shift+Enter to exit the cell, instead of using Enter. This will put { } around the formula, which has no effect when done manually.

    Hulk Smash!
    Attached Files Attached Files
    Last edited by daffodil11; 02-14-2014 at 07:20 PM. Reason: Bruce Banner made minor miscalculation
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  4. #4
    Registered User
    Join Date
    06-11-2013
    Location
    Toronto
    MS-Off Ver
    2013
    Posts
    25

    Re: CrossTab list or Arrays???

    That did the trick! Thanks

  5. #5
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: CrossTab list or Arrays???

    Glad I was able to help out.

+ 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. multi-variable Crosstab
    By mmlinar in forum Excel General
    Replies: 1
    Last Post: 06-10-2012, 08:45 PM
  2. Replies: 1
    Last Post: 03-08-2011, 12:31 PM
  3. Amend crosstab display
    By BennyBoy01 in forum Excel General
    Replies: 2
    Last Post: 02-12-2010, 12:17 PM
  4. Looping through crosstab worksheet
    By jpendegraft in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-24-2006, 07:26 PM
  5. Need crosstab function in excel
    By patrick in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-26-2005, 09: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