• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Conversion Help [SOLVED]

darkstar144

New Member
I hoping someone can help me convert two columns of data into one column of data. I have tried a reverse pivot table, but I did not get the results I was looking for.


This is what I have:

48088 3

48098 1

48096 5

48329 2


This is what I need:


48088

48088

48088

48098

48096

48096

48096

48096

48096

48329

48329
 
Hi, darkstar144!


First of all welcome to Chandoo's website Excel forums. Thank you for your joining us and glad to have you here.


As a starting point I'd recommend you to read the green sticky topics at this forums main page. There you'll find general guidelines about how this site and community operates (introducing yourself, posting files, netiquette rules, and so on).


Among them you're prompted to perform searches within this site before posting, because maybe your question had been answered yet.


Feel free to play with different keywords so as to be led thru a wide variety of articles and posts, and if you don't find anything that solves your problem or guides you towards a solution, you'll always be welcome back here. Tell us what you've done, consider uploading a sample file as recommended, and somebody surely will read your post and help you.


And about questions in general...


If you haven't performed yet the search herein, try going to the topmost right zone of this page (Custom Search), type the keywords used in Tags field when creating the topic or other proper words and press Search button. You'd retrieve many links from this website, like the following one(s) -if any posted below-, maybe you find useful information and even the solution. If not please advise so as people who read it could get back to you as soon as possible.


And about this question in particular...


If you can afford using a helper column do this:

a) C1: =SUMA(B$1:B1)+,1 -----> in english: =SUM(B$1:B1)+.1

b) copy down thru last input row (4)

c) D1: =SI(FILA()<=SUMA(B$1:B$4);INDICE(A$1:A$4;SI.ERROR(COINCIDIR(FILA();C$1:C$4;1);0)+1);"") -----> in english: =IF(ROW()<=SUM(B$1:B$4),INDEX(A$1:A$4,IFERROR(MATCH(ROW(),C$1:C$4,1),0)+1),"")

d) copy down until row of column C last cell value (C4, 11) or until a blank entry appears in column D.


Just advise if any issue.


Regards!


EDITED


Formulas adjusted.
 
Thanks SirJB7,

This is what Im getting in Columns C and D now. Its a little off


3 48088

4 48088

9 48088

11 48098

48098

48098

48098

48098

48096

48096

48329


48088 is correct, others are not.
 
Hi, darkstar144!

I've just updated my previous post. Please check the fixed formulas.

Regards!
 
Hey SirJB7,

Column C looks like this now:

3.1

4.1

9.1

11.1


Column D gives me a error when I input the formula:

"Your formula is missing a parenthesis--) or (.
 
Hi, darkstar144!


Yes, column C now should have values equal to the sum of cells from row 1 thru actual row plus any decimal fraction so as the MATCTH function doesn't retrieve the next step for rows 3, 4, 9, 11, ...


And let me check again column D formula:

=SI(FILA()<=SUMA(B$1:B$4);INDICE(A$1:A$4;SI.ERROR(COINCIDIR(FILA();C$1:C$4;1);0)+1);"") -----> in english: =IF(ROW()<=SUM(B$1:B$4),INDEX(A$1:A$4,IFERROR(MATCH(ROW(),C$1:C$4,1),0)+1),"")

I think it was correct, but just in case here it's the link to a sample file:

https://dl.dropboxusercontent.com/u/60558749/Conversion%20Help%20%28for%20darkstar144%20at%20chandoo.org%29.xlsx


Regards!
 
Hey SirJB7,

Original formula had 2 =IF(ROW()


I removed one of them and it is working fine now!


Next problem I have is that I usually get larger lists of data that needs to be converted like this. Sometimes 500,000 rows. Can the formula be edited so I can convert a larger amount of data? Copy down the formulas as far as needed?
 
Hi, darkstar144!


Yes, you're right, it was an issue of the language conversion, in Spanish it was Ok and that's the one I checked. And for greater ranges you could either replace the $4 by a $500000 or whichever were the number or replace references as follows so as to work with the whole column:

$A1:$A4 by $A:$A

$B1:$B4 by $B:$B

$C1:$C4 by $C:$C


And the method for copying until it's the same as described in my first post in b) & d).


Glad you solved it. Thanks for your feedback and for your kind words too. And welcome back whenever needed or wanted.


Regards!
 
Back
Top