ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   table totxt (https://www.excelbanter.com/excel-programming/293728-re-table-totxt.html)

Dave Peterson[_3_]

table totxt
 
I'd this (against a copy of the data!):

Select your range
Edit|goto|special
constants
ok

This should select all your +'s (if the +'s are the results of a formula, then
Edit|paste special|values, first)

then type:
=column()

and hit control Enter.

This should fill all those cells with the number of the column that they're in.

Then use a helper cell (F1) and use this formula:
=IF(A1="","",A1&",")&IF(B1="","",B1&",")&IF(C1="", "",C1&",")
&IF(D1="","",D1&",")&if(e1="","",E1&",")

You'll end up with:
2,3,
Now use another helper cell (G1) and use this formula:
=IF(F1="","",LEFT(F1,LEN(F1)-1))

Drag both formulas down the table.

Now select that last column (G) and copy|paste into notepad.





tony wrote:

I have a table as follow
1 2 3 4 5
A +
B + +
C + + + +

How can I get saved on a txt file the following interpretation of the table
A 1
B 2,3
C 1,3,4,5

Thanks


--

Dave Peterson



All times are GMT +1. The time now is 12:23 AM.

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