Hi,
This is a technique methodology question.
If I had a row of data with say 10 columns of data, what might be a way of altering the order of the columns along with the relevant data items. Ideally I'd like to define a string..
"Length/Type/Duration/Start Time/Name/Date/Channel/Index Number/Author"
.. say, and be able to change the order the data is presented in in the headings and columns by altering just the string.
Any suggestions and thoughts appreciated..
TIA
Lisa
Flexible data columns
-
- UraniumLounger
- Posts: 9284
- Joined: 13 Feb 2010, 01:27
- Location: Deep in the Heart of Texas
Re: Flexible data columns
There is probably an obvious answer, but why not just sort the columns instead of the rows?
Bob's yer Uncle
Dell Intel Core i5 Laptop, 3570K,1.60 GHz, 8 GB RAM, Windows 11 64-bit, LibreOffice,and other bits and bobs
(1/2)(1+√5) |
-
- Administrator
- Posts: 78481
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Flexible data columns
Would you have the string in a cell, and have Excel change the column order automatically when the cell is edited?
If not, how would it work?
If not, how would it work?
Best wishes,
Hans
Hans
-
- 5StarLounger
- Posts: 964
- Joined: 08 Nov 2012, 17:54
Re: Flexible data columns
> How would that work
You're right. There has to be a link between what the data represents and where it's put on the sheet. Ie.. The columns in the data must be named somehow. It's a kludge but maybe I'll go with the first row.
OTOH perhaps I'll try and use SQL in excel and ORDINAL though I think there still needs to be some connection. hmmmmm.
Will have a lookie.
Thanks for prompting me Hans.
LIsa
You're right. There has to be a link between what the data represents and where it's put on the sheet. Ie.. The columns in the data must be named somehow. It's a kludge but maybe I'll go with the first row.
OTOH perhaps I'll try and use SQL in excel and ORDINAL though I think there still needs to be some connection. hmmmmm.
Will have a lookie.
Thanks for prompting me Hans.
LIsa
-
- 2StarLounger
- Posts: 146
- Joined: 11 Jun 2012, 20:37
Re: Flexible data columns
Lisa, try changing the string in cell E1 of the attached and observe the table below.
You do not have the required permissions to view the files attached to this post.
-
- PlutoniumLounger
- Posts: 15619
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: Flexible data columns
Hi Lisa. Notwithstanding the immediately practical suggestions above, I think that you are thinking of a "Data Descriptor" for which the web has several indexed pages. You might afterwards narrow your search to "VBA Data Descriptor" . That ought to bring you around to the VBA TYPE/END TYPE statement for ideas.
Some people call this "dealing with meta-data, which I suppose it is, but your idea of "Length/Type/Duration/Start Time/Name/Date/Channel/Index Number/Author" seems to be defining some data which (definition) is itself data to be manipulated.
Closer to home: when I call a VBA procedure passing the parameters ByRef[erence}, I think of those parameters as data descriptors.
Cheers
Chris
There's nothing heavier than an empty water bottle