Automatically Convert To Treeview

Draperies

Board Regular
Joined
Jun 29, 2009
Messages
79
I have different table headings that I would like to automatically convert into a treeview. Some examples of this are the following:

example.jpg


My goal is to automatically produce a treeview that would look like the following for the first example:

-Total
-Student Type
-High School
-College
-Shown Stimuli
-Saw
-Did Not See

And this for the second:
-Total
-High School Students
-Pre Stimuli
-Group 1
-Group 2
-Group 3
-Post Stimuli
-Group 1
-Group 2
-Group 3
-College Students
...etc

I have been working on this for sometime and have gotten basically nowhere on it. Part of the problem is that the merged cells seem to only store the value for all the merged cells (and unfortunately I have no choice but to keep them as merged cells) in the upper leftmost cell... although even if that wasn't a problem I still am having tremendous difficulty getting anything to work with this. ANY direction or help on this would be greatly appreciated. Thank you!
 
Yes, I actually did consider that. Copying what was there to some temporary location and unmerging everything to work with. The only problem is I then cannot tell which items belong under which parent since the merge was representative of that. So for example, "College" now appears to be on it's own instead of under the parent "Student Type".

By the way, thank you for taking a look at this so far. I know this is an extremely annoying thing to work with.
 
Upvote 0

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
I thought it was still clear, or even clearer, going by the underlining perhaps what the nodes/date.

Maybe I've been looking at it too long.:eek:

If I had this sort of data I'd probably try restructuring the data manually (obviously using copy/paste etc).

Hopefully after doing that a few times something would emerge that could make things simpler, and perhaps eventually coded.

I'll have another look later.

Anyway, I think I may have neglected an important part of the whole thing - the actual treeview.:)
 
Upvote 0
I think you're right Norie, it is clearer going by the underlining with the unmerged cells. I'll try and combine your recommendations and some of the example of your file Krishnakumar. I'll post something if I come up with something!

Thanks guys.
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,865
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top