+ Reply to Thread
Results 1 to 9 of 9

Advanced Transposing

  1. #1
    Forum Contributor
    Join Date
    05-17-2017
    Location
    Tallahassee
    MS-Off Ver
    15.32
    Posts
    206

    Advanced Transposing

    I hope you are all having a good day. Here is a sample of the data:

    NOTE, AFTER SUBMITTING, IT WON'T SPACE OUT THE DATA EVENLY. PLEASE NOTICE THAT A SPACE BETWEEN VALUES REPRESENTS IT BELONGS IN A SUBSEQUENT COLUMN.

    Client Product Jan-17 Feb-17
    A X 17 1
    A Y 15 10
    B X 13 14
    C X 1 18
    C Y 7 19
    C Z 17 21

    I want to transpose it so it looks like the following:

    Client Date X Y Z
    A Jan-17 17 15
    A Feb-17 1 10
    ...

    How would I do this without VBA code?

    Thanks!

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: Advanced Transposing

    With your first table on Sheet1, starting in Cell A1, and your second table on Sheet2 starting in A1, enter this into Sheet2, cell C2:

    =SUMIFS(INDEX(Sheet1!$C:$D,,MATCH($B2,Sheet1!$C$1:$D$1,FALSE)),Sheet1!$A:$A,$A2,Sheet1!$B:$B,C$1)

    and copy down and across to match your labels on Sheet2. This relies on all combinations of Client and Date existing on both sheets: in column A and row 1 on Sheet1, and in columns A and B on Sheet2.

    Note that this will return 0 for any product that does not exist for a client/date combo.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Forum Contributor
    Join Date
    05-17-2017
    Location
    Tallahassee
    MS-Off Ver
    15.32
    Posts
    206

    Re: Advanced Transposing

    Bernie, thank you for the explanation. Is there any way you could break down this formula for me so I can understand it? I tried on my own and couldn't get it to work, however, with a dumbed down explanation, I believe I will get it. Thanks in advance!

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: Advanced Transposing

    This part:

    INDEX(Sheet1!$C:$D,,MATCH($B2,Sheet1!$C$1:$D$1,FALSE))

    chooses the column (C or D) based on the date in B2 matching the header dates in Sheet1 C1:D1 - so it passes either column C or D to the SUMIFS - the rest is simply the standard SUMIFS, with the correct $ing to allow copying into a table.

    =SUMIFS(C or D,Sheet1!$A:$A,$A2,Sheet1!$B:$B,C$1)

  5. #5
    Forum Contributor
    Join Date
    05-17-2017
    Location
    Tallahassee
    MS-Off Ver
    15.32
    Posts
    206

    Re: Advanced Transposing

    Bernie,

    I copied your formula in and I tried to recreate it on my own, however, both end up resulting in an error. Can you help me further on this? I highly appreciate all your help.

  6. #6
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: Advanced Transposing

    I have attached a working example using your data. Insert rows and columns as needed to expand the ranges...
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    05-17-2017
    Location
    Tallahassee
    MS-Off Ver
    15.32
    Posts
    206

    Re: Advanced Transposing

    Thank you. I see where I was unclear in exactly what I wanted. I also want the formula to be able to pull the Client data and the Date data. My actual dataset is from Jan 2014 to Dec 2017 and I have 60 clients. Thus, by hand, I'd have to copy the dates 60 times and drag the clients name down 60 times. Do you have a workaround for this?

  8. #8
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: Advanced Transposing

    Give this one a try:
    Attached Files Attached Files

  9. #9
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Advanced Transposing

    Hi Edward,

    There is a newer tool in Excel called Power Query that has a tool called Fill Down. Your last sentence above seems like this is what you are looking for. Without a sample file it is hard to know exactly what you want.

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

+ 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. More advanced advanced filtering
    By Acceleracer in forum Excel General
    Replies: 2
    Last Post: 02-06-2014, 09:02 PM
  2. Advanced data transposing
    By heidilaw4 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-20-2013, 03:06 AM
  3. [SOLVED] Advanced Variable Transposing
    By ian.clark in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-08-2013, 03:16 AM
  4. advanced filter - button to re apply advanced filter across multiple sheets
    By motmac87 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2013, 11:16 PM
  5. Transposing list of values with 6 zeroes in front to retain the zero after transposing
    By Lisa4legin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-16-2013, 03:34 AM
  6. Help needed for advanced transposing
    By ncikusa in forum Excel General
    Replies: 3
    Last Post: 03-09-2011, 03:47 AM
  7. Replies: 2
    Last Post: 07-21-2006, 10:05 AM
  8. Advanced Transposing?
    By SHexceluser in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-12-2005, 11:05 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