English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories
0

I have a spreadsheet with about 8,000 row and in each row there are 25 columns of data the first 5 columns i need in the columnar form the last 20 in need listed in a 6th column. so i wrote a macro and it works but only for the first row i used to write it with. How can i get it to move on to the second row or the 22nd row (because i have the first row then append 20 rows of columnar data which gives me 21 so the next row that needs reformatting is 22) and preform the same reformatiing?

2007-12-12 09:06:22 · 2 answers · asked by maybe l 1 in Computers & Internet Software

2 answers

Can you restate your question so that it makes more sense? I'm pretty sure that what you are trying to do can be done, however the way you phrased your question is not coherent and doesn't make sense. If you can restate your question more coherently, I should be able to help you make your macro work.

You'll probably want to use a For/Next loop to loop through the rows and change the data. However, I'm not really certain how you want to modify the data by appending rows, etc. To know how many rows you have, you can use the UsedRange property along with the Count property to figure that out. Or you could possibly use the CurrentRegion property and Count property.

You have to remember the people on here cannot see your Excel workbook whereas you can. So we can only go off of the description you give us, and that's why the description needs to be well written. Otherwise, it's hard to picture what you are trying to do.

2007-12-13 01:54:23 · answer #1 · answered by devilishblueyes 7 · 0 0

If I understand you correctly - you are trying to move the data from column 20 to column 6?
Try to record the Macro as the follows -

1. Insert a column in between column 5 & 6

2. Cut entire column 20 and paste it to the blank column created above

3. Delete the blank column left behind by column 20

2007-12-15 08:15:04 · answer #2 · answered by swy3388 3 · 0 0

fedest.com, questions and answers