Eric - Netminder
asked on
Spreadsheet reformatting
Excel 2000. I know, it's old. So am I.
I have been sent a spreadsheet that is just data -- no formulas or references. It looks something like this:
Thanks!
ep
I have been sent a spreadsheet that is just data -- no formulas or references. It looks something like this:
Type1 Data1A Data1B Data1C Data1D ... Data1U
Type2 Data2A Data2B Data2C Data2D ... Data2U
...
Type321 Data321A Data321B Data321C Data321D ... Data321U
Type322 Data322A Data322B Data322C Data322D ... Data322U
In other words, 322 rows across 21 columns. What I need is something like this:Type1
Data1A
Data1B
Data1C
Data1D
...
Data1U
Type2
Data2A
Data2B
Data2C
Data2D
...
Data2U
...
Type321
Data321A
Data321B
Data321C
Data321D
...
Data321U
Type322
Data322A
Data322B
Data322C
Data322D
...
Data322U
I know I could probably track down someone who could very quickly and easily write up something that would churn out such a list, but then I wouldn't learn anything... So can someone point me in the right direction?Thanks!
ep
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Brad,
I'm getting a type mismatch when I run the macro at line 14.
v(k, 1) = vData(i, j)
Thomas,
Very slick. Took me a couple of minutes (it's been a long time since I played with modules, and those were all in Access), but it works exactly as advertised.
Thanks!!
ep
I'm getting a type mismatch when I run the macro at line 14.
v(k, 1) = vData(i, j)
Thomas,
Very slick. Took me a couple of minutes (it's been a long time since I played with modules, and those were all in Access), but it works exactly as advertised.
Thanks!!
ep
ASKER
My apologies; the style sheet for the page didn't load, and I incorrectly closed this, so I used those magic powers EE has bestowed (guess the newsletter work comes in handy once in a while) and reopened it, then re-closed it.
Thanks to both of you for your kind assistance.
ep
Thanks to both of you for your kind assistance.
ep
Eric,
Could you please post your workbook? The code is working using my sample data, but there may be something I hadn't anticipated with your actual data.
Brad
Could you please post your workbook? The code is working using my sample data, but there may be something I hadn't anticipated with your actual data.
Brad
ASKER
Sure. This is what I received; it has no modules or macros attached. It's probably also recognizable to you, if not necessarily to Thomas... *laughing*
BradTest.xls
BradTest.xls
Eric,
The earliest Excel on my computer is Excel 2003, which is very similar to Excel 2000 in terms of VBA code. The code runs without error on both Excel 2003 and 2013.
I don't know why my code generates an error on your computer.
Brad
The earliest Excel on my computer is Excel 2003, which is very similar to Excel 2000 in terms of VBA code. The code runs without error on both Excel 2003 and 2013.
I don't know why my code generates an error on your computer.
Brad
ASKER
Brad,
It could quite easily be a problem that exists between the keyboard and the chair.
ep
It could quite easily be a problem that exists between the keyboard and the chair.
ep
ASKER
For the record, I was able to get Brad's code to work; I'm not sure what I did differently.
The major difference between Thomas' macro and Brad's is that Thomas' puts the data on a new worksheet, preserving the original -- which is kind of nice when you're not quite sure what you're doing.
ep
The major difference between Thomas' macro and Brad's is that Thomas' puts the data on a new worksheet, preserving the original -- which is kind of nice when you're not quite sure what you're doing.
ep
ASKER
That worked perfectly. I hate to ask (okay, not really -- I'm trying to understand what I'm doing), but can you explain what's going on?
And for giggles and grins, how would I implement a macro that does the same thing?
ep