This was a VBA for Excel project. The program takes as input a series of text strings. In each of these text strings there is a specific word. For each of these words the user provides a list of values to replace them with. The program produces all possible combinations of these text strings replaced by the values provided by the user.
In this project the client requested an excel gui with input fields (Main, Title, Tracking and Tag text fields). In each field the user would input text. In the text there were variables in the format VARx (where x was an Integer) for example VAR1, VAR2, VAR3 . . . The main purpose of this project was to search for these variables in the text and replace them with all the possible combinations of a set of predefined values. Asides from that the client also requested some specific customization:
1- When replacing the variables in the Main, Tracking and the Tag text fields, the variables should have the same values as the variables in the Title text field. For example:
Lets say these are the variables in the Title text:
VAR1, VAR3, VAR4
and lets say these are the values being assigned to the variables
VAR1 = VALUE1_A, VALUE1_B
VAR2 = VALUE2_A, VALUE2_B,VALUE2_C
VAR3 = VALUE3_A
VAR4 = VALUE4_A, VALUE4_B, VALUE4_C,VALUE4_D
This would be a valid combination:
See how VAR1 has the same value in both texts, but the combination below would not be acceptable:
2- Another customization the client requested was that the variables that were not in the title should be given a random value from the set of predefined values.
Step 2: After pressing the run button, in the second tab the variables that have been detected will show. Here the user can select the data to replace these variables with.
Step 3: After pressing the run button the results are printed in an excel sheet. Below you can see 3 of the rows.