Hi, to any Macro coders out there, I am trying to create a basic spreadsheet with a macro that does the following:
On the first tab, there are two columns. A1 reads "Name" and B1 reads "Code".
As an example, cell A2 contains "Billy Bob" and cell B2 contains the number 5236.
On the second tab, there are two columns. A1 is named "Code" and B1 is named "Favorite Color"
As an example, A2, A3, and A4 each have the value 5236. B2, B3, and B4 show "Blue", "Red", and "Green" respectively.
What I am trying to do on a third tab is to list all of the children's names. And then once the macro is run, it would show the child's name and their favorite color. The twist is that if the child has more than one favorite color (for example, Billy Bob was tied to 5236 which is tied to the three colors "Blue", "Red", and "Green", then Excel creates three rows for Billy Bob like this:
Bill Bob Blue
Billy Bob Red
Billy Bob Green
where Billy Bob is in column A, and the color is in Column B.
The reason I am having trouble is that the children might like 1, 2, 3, all the way up to 6 colors. Does anyone know how to program this? It would save hundreds of hours of manual entry.
Thank you!!!
On the first tab, there are two columns. A1 reads "Name" and B1 reads "Code".
As an example, cell A2 contains "Billy Bob" and cell B2 contains the number 5236.
On the second tab, there are two columns. A1 is named "Code" and B1 is named "Favorite Color"
As an example, A2, A3, and A4 each have the value 5236. B2, B3, and B4 show "Blue", "Red", and "Green" respectively.
What I am trying to do on a third tab is to list all of the children's names. And then once the macro is run, it would show the child's name and their favorite color. The twist is that if the child has more than one favorite color (for example, Billy Bob was tied to 5236 which is tied to the three colors "Blue", "Red", and "Green", then Excel creates three rows for Billy Bob like this:
Bill Bob Blue
Billy Bob Red
Billy Bob Green
where Billy Bob is in column A, and the color is in Column B.
The reason I am having trouble is that the children might like 1, 2, 3, all the way up to 6 colors. Does anyone know how to program this? It would save hundreds of hours of manual entry.
Thank you!!!