ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Combining multiple rows to one (https://www.excelbanter.com/excel-programming/377219-combining-multiple-rows-one.html)

[email protected]

Combining multiple rows to one
 
I have a txt file (seperated by commas) that I have imported into
excel. The problem is one line shows the customer name, address,
account number. the other line shows products, price, quantity. It is
seperated like this in the text file as well. All rows with the
customer name address and account number begin with a cell that has the
number 2 in it. All rows with the products, price, quantity begin with
a cell that has the number 3 in it. There will always be only one
customer but there can be multiple product rows. For me to manage this
data I need the customer info and the product info on one row. What
function can I use that will tell excel IF a row begins with a 3 add it
to the end of the preceding row that begins with a 2. That will also
be able to do this with multiple rows of 3's.


Alan Beban

Combining multiple rows to one
 
Is the number of columns uniform? I.e., are there always 3 columns
following the 2 and 3 columns following the 3?

Alan Beban

wrote:
I have a txt file (seperated by commas) that I have imported into
excel. The problem is one line shows the customer name, address,
account number. the other line shows products, price, quantity. It is
seperated like this in the text file as well. All rows with the
customer name address and account number begin with a cell that has the
number 2 in it. All rows with the products, price, quantity begin with
a cell that has the number 3 in it. There will always be only one
customer but there can be multiple product rows. For me to manage this
data I need the customer info and the product info on one row. What
function can I use that will tell excel IF a row begins with a 3 add it
to the end of the preceding row that begins with a 2. That will also
be able to do this with multiple rows of 3's.



All times are GMT +1. The time now is 02:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com