I am creating names of tables and each table is named based on a hierarchy. The following example are made up names, but will serve the purpose of my example. As I hope you can tell, I am taking the first word from the first column and creating every possible variation from the words of following columns. The first column (Col A) is the top hierarchy where it becomes the first part of the name, the second column (Col B) is the next highest becoming the second part of the name, and so on. What can be written via VBA to loop through each word of each column to create a new name? The "Results" column is a sample of what I want to achieve.
Col A Col B Col C Col D Results
ABC CAT RED ONE ABC_CAT_RED_ONE
DEF DOG ORG TWO ABC_CAT_RED_TWO
GHI PIG YLW THR ABC_CAT_RED_THR
JKL BAT GRN FOR ABC_CAT_RED_FOR
MNO BOY BLU FIV ABC_CAT_RED_FIV
MAN PUR SIX ABC_CAT_RED_SIX
BUG BLK SEV ABC_CAT_RED_SEV
WHT EGT ABC_CAT_RED_EGT
BRW NIN ABC_CAT_RED_NIN
PNK TEN ABC_CAT_RED_TEN
LAV ABC_CAT_ORG_ONE
BEI ABC_CAT_ORG_TWO
ABC_CAT_ORG_THR
ABC_CAT_ORG_FOR
ABC_CAT_ORG_FIV
ABC_CAT_ORG_SIX
ABC_CAT_ORG_SEV
ABC_CAT_ORG_EGT
ABC_CAT_ORG_NIN
ABC_CAT_ORG_TEN
etc.Example-of-Hierarchy-Naming.xlsxI am creating names of tables and each table is named based on a hierarchy. The following example are made up names, but will serve the purpose of my example. As I hope you can tell, I am taking the first word from the first column and creating every possible variation from the words of following columns. The first column (Col A) is the top hierarchy where it becomes the first part of the name, the second column (Col B) is the next highest becoming the second part of the name, and so on. What can be written via VBA to loop through each word of each column to create a new name? The "Results" column is a sample of what I want to achieve.
Col A Col B Col C Col D Results
ABC CAT RED ONE ABC_CAT_RED_ONE
DEF DOG ORG TWO ABC_CAT_RED_TWO
GHI PIG YLW THR ABC_CAT_RED_THR
JKL BAT GRN FOR ABC_CAT_RED_FOR
MNO BOY BLU FIV ABC_CAT_RED_FIV
MAN PUR SIX ABC_CAT_RED_SIX
BUG BLK SEV ABC_CAT_RED_SEV
WHT EGT ABC_CAT_RED_EGT
BRW NIN ABC_CAT_RED_NIN
PNK TEN ABC_CAT_RED_TEN
LAV ABC_CAT_ORG_ONE
BEI ABC_CAT_ORG_TWO
ABC_CAT_ORG_THR
ABC_CAT_ORG_FOR
ABC_CAT_ORG_FIV
ABC_CAT_ORG_SIX
ABC_CAT_ORG_SEV
ABC_CAT_ORG_EGT
ABC_CAT_ORG_NIN
ABC_CAT_ORG_TEN
etc.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.
-Mike Kapnisakis, Warner Bros
With your subscription - you'll gain access to our exclusive IT community of thousands of IT pros. You'll also be able to connect with highly specified Experts to get personalized solutions to your troubleshooting & research questions. It’s like crowd-sourced consulting.
We can't always guarantee that the perfect solution to your specific problem will be waiting for you. If you ask your own question - our Certified Experts will team up with you to help you get the answers you need.
Our certified Experts are CTOs, CISOs, and Technical Architects who answer questions, write articles, and produce videos on Experts Exchange. 99% of them have full time tech jobs - they volunteer their time to help other people in the technology industry learn and succeed.
We can't guarantee quick solutions - Experts Exchange isn't a help desk. We're a community of IT professionals committed to sharing knowledge. Our experts volunteer their time to help other people in the technology industry learn and succeed.
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.