Hello
I would like a pivot table creating with the output shown in the table example sheet
Does anyone know how to create it?
Hello
I would like a pivot table creating with the output shown in the table example sheet
Does anyone know how to create it?
You can't do that with a pivot table. You can group and bundle things in row or column headers, but anything in the data grid is going to come out as a number.
You can use Match / Index to look up text information. If the rows and columns are "static" you can set this up. If the data is dynamic then you will have to use VBA to make the column and row headers and fill in the formulas.
One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.
A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.
The data would be static.. in that case how would I do this by match/index?
I put the code in an Excel table. I see by your profile that you have Excel 2003 that does not support tables, but the XLSX file you attached indicates you have at least 2007 which does support tables.
Tables don't confer a great advantage here as they do in most other programs but is does make it easier to track the columns.
I added a helper column to the table. What we want to track depends on both the Ref and the code so I made a composite that has the formula: =SUBSTITUTE([@Ref]&":"&[@Code],"#",""). This is the Ref + the Code with a delimiter in between (for easier reading). I had to wrap the SUBSTITUTE around the whole thing because P100 and P002 codes have trailing # but the column headers on the display do not.
Then we move over to Sheet 1 where we take advantage of INDEX and MATCH: =IFERROR(INDEX(Table_Codes,MATCH($A2&":"&B$1,Table_Codes[Composite],0),2),"")
I make a composite out of the row and column headers using partial absolute addressing (keep the column static for the Ref and the row static for the code). I use the composite to find the matching row in the table and we want the second column from the table that is on this row. There are a lot of "misses" that would normally evaluate to #N/A, so I "silenced" them with IFERROR.
and update your profile about your real excel version (Excel 2003 cannot produce xlsx file)
As mentioned above you can't do that with Pivot Table, your source doesn't contain elements what you show in your result tab (headers).
Because I don't know your Excel version, try this one, done with PowerQuery
Hi Gerald,
Would this answer be ok?
PT Count instead of Text.xlsx
One test is worth a thousand opinions.
Click the * Add Reputation below to say thanks.
Hi Marvin,
Ideally I want it to pick up the W221 information as i need that information to concatenate later into another table.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks