+ Reply to Thread
Results 1 to 3 of 3

Thread: Amend crosstab display

  1. #1
    Registered User
    Join Date
    02-08-2010
    Location
    Herts
    MS-Off Ver
    Excel 2007
    Posts
    4

    Amend crosstab display

    Trying to convert a crosstab type of display. Current data is set out like below:


    Code Store1 Store2 Store3
    a 2.3 2.5 2.6
    b 2.2 2.5 2.9
    c 1.8 2.4 3.1
    d 2.0 2.2 2.1
    e 2.1 2.3 2.7

    In total I have 60+ rows for the Code column and 400+ store columns.

    Eventually I would like the data to read like this:

    Store Code Value
    Store1 a 2.3
    Store1 b 2.2
    Store1 c 1.8
    Store1 d 2.0
    Store1 e 2.1
    Store2 a 2.5
    Store2 b 2.5
    Store2 c 2.4

    And so on.

    Is there a way to write someting in excel to do this? Or a method through a pivot table?
    Hope somebody can help.

    Ben.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    MS 2007
    Posts
    5,372

    Re: Amend crosstab display

    Here's how I did it.
    To get the store names (dragged down)
    =INDEX($B$1:$D$1,1,INT((ROW(A1)-1)/5)+1)
    where B1:D1 is the range where your store names are.

    To get the codes (dragged down)
    =INDEX($A$2:$A$6,MOD(ROW(A1)-1,5)+1)
    where A2:A6 is the range where your store names are.

    To get the values (dragged down)
    =INDEX($B$2:$D$6,MATCH(B10,$A$2:$A$6,0),MATCH(A10,$B$1:$D$1,0))
    In my example, this is in C10 so B10 is the first code in your new table, A10 is the first store in your new table and B2:D6 is the range of your original data.
    See attached. Does this work for you?
    Attached Files Attached Files
    ChemistB
    My 2¢

    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

  3. #3
    Registered User
    Join Date
    02-08-2010
    Location
    Herts
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Amend crosstab display

    Many thanks ChemistB - it worked exactly how I needed it to!

    Ben.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.2.0