Hi,
Im looking for a formula solution that would help me unpivot a set of data
For Eg.
I have ABC 12,13,14 in a row
which I would like to convert to ABC 12
ABC 13
ABC 14
Attached file for reference
Thanks in advance
Hi,
Im looking for a formula solution that would help me unpivot a set of data
For Eg.
I have ABC 12,13,14 in a row
which I would like to convert to ABC 12
ABC 13
ABC 14
Attached file for reference
Thanks in advance
You need a helper in c2, copied down:
=LEN(B2)-LEN(SUBSTITUTE(B2,",",""))+1
Then in G2, this array formula:
=IFERROR(INDEX($A$2:$A$5,MATCH(0,--(COUNTIF($G$1:G1,$A$2:$A$5)=$C$2:$C$5),0)),"")
Then in H2, this ordinary formula:
=IF(G2="","",--TRIM(MID(SUBSTITUTE(","&VLOOKUP(G2,$A$2:$B$5,2,FALSE),",",REPT(" ",125)),125*COUNTIF($G$2:G2,G2),125)))
Array Formulae are a little different from ordinary formulae in that they MUST be confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER.
You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.
Don't type the curly brackets yourself - it won't work...
Glenn
None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU
Thanks Glenn
Works perfect!!
You're welcome....
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks