Change # of rows & columns w/o damaging data?

L

Lingyun Xu (neil)

I have one excel file which contains 1166 rows and 5 columns. How can I
change it to 1994 rows and 3 columns, while I can keep the data?

thanks
 
J

J.E. McGimpsey

Lingyun Xu (neil) said:
I have one excel file which contains 1166 rows and 5 columns. How can I
change it to 1994 rows and 3 columns, while I can keep the data?

Need more detail here...

How should the data be transformed? Should columns D & E be
distributed in rows 1167 to 1994? Should D1 become A2, E1 become B2,
A2 become C3, B2 become A3, etc.?

1166 rows x 5 columns = 5830 cells
1994 rows x 3 columns = 5982 cells

Does this mean that (5982-5830)/3 = 50.67 rows will be blank?
 
L

Lingyun Xu (neil)

You are right. All I need is to make D1 to A2, E1 to B2, A2 to C3

In fact I have 18*18*18 elements. The original data was a text file. I
converted it to csv. The problem is these data are based on X Y Z
coordinates but the csv file is separated by 5 columns. I have to make it 3
columns.

thanks
 
J

J.E. McGimpsey

Lingyun Xu (neil) said:
You are right. All I need is to make D1 to A2, E1 to B2, A2 to C3

In fact I have 18*18*18 elements. The original data was a text file. I
converted it to csv. The problem is these data are based on X Y Z
coordinates but the csv file is separated by 5 columns. I have to make it 3
columns.

one way:

on a separate sheet enter this in cell A1:

=OFFSET(Sheet1!$A$1,INT((ROW()*3+COLUMN()-4)/5),
MOD(ROW()*3+COLUMN()-4,5))

copy right to C1, then copy A1:C1 down as far as required.

To convert the formulas to values, you can then select columns A:C,
copy them, then choose Edit/Paste Special, selecting the Values
radio button.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top