Populate Treeview from worksheet

djreiswig

Well-known Member
Joined
Mar 13, 2010
Messages
523
I have a worksheet with the following columns.

Item Number, Description, Group


I would like to display the sheet in a treeview control with the Group as the parent, and the Description as the child. Each group can have multiple Item Numbers and Descriptions.

I would like the key of the each child to be the Item Number, which is the data I will need when the desired node is selected. Since the Item Number is numeric, I know I will have to add a letter to keep from causing an error. I was thinking of just adding the letter A for this.

I have a few ideas on how to do this, but I'm not sure what is the best way to go. There are about 1800 lines in my worksheet and probably 30 or so groups if that matters.
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

Forum statistics

Threads
1,214,984
Messages
6,122,601
Members
449,089
Latest member
Motoracer88

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