Hi
I'm hoping that someone can please help me.
I have a spreadsheet with x2 tabs and I have imaginatively named them "1" and "2".
On tab 1 there is a table
Column A represents the "Name" & cells A2-A5 have names in I.e. Mark, Paul, Adam and Cy
Cells B1 & C1 have been merged and have the number 1 in
Cells D1 & E1 have been merged and have the number 2 in
Cells F1 & G1 have been merged and have the number 3 in
Cells B2-B5, D2-D5 and F2-F5 have a number in and this can be any number
Cells C2-C5, E2-E5 and G2-G5 are currently blank but have a count formula in
On tab 2 there is information across several columns, however, Column A is blank and Column E has the numbers 1, 2 or 3 in every cell up to row 1368. What I want the Macro to do is to enter the names Mark, Paul, Adam and Cy into the cells of Column A based on the information in the table of tab 1.
I.e the table shows that "Mark" has the number 33 in Cell B2 for the number 1, the Macro would then auto populate 33 cells in Column A of tab 2 for every corresponding '1' in Column E. It will stop when the count formula in cell C2 on tab 1 has counted the correct number needed.
It will then move onto the next name until it has auto-populated Column A on tab 2 for all 1's in Column E. It will then move onto all 2's.
Also to consider is if there is an error, in that there were not enough 1's available for the numbers entered on tab 1 as the figures were rounded up. It should just populate as many that are available.
I'm sorry if the above sounds very confusing but hopefully have conveyed what I am trying to do. I have very basic Macro knowledge so this will help out a lot and cut down on a lot of wasted time.
Any help will be greatly appreciated.
Many thanks for looking.
I'm hoping that someone can please help me.
I have a spreadsheet with x2 tabs and I have imaginatively named them "1" and "2".
On tab 1 there is a table
Column A represents the "Name" & cells A2-A5 have names in I.e. Mark, Paul, Adam and Cy
Cells B1 & C1 have been merged and have the number 1 in
Cells D1 & E1 have been merged and have the number 2 in
Cells F1 & G1 have been merged and have the number 3 in
Cells B2-B5, D2-D5 and F2-F5 have a number in and this can be any number
Cells C2-C5, E2-E5 and G2-G5 are currently blank but have a count formula in
On tab 2 there is information across several columns, however, Column A is blank and Column E has the numbers 1, 2 or 3 in every cell up to row 1368. What I want the Macro to do is to enter the names Mark, Paul, Adam and Cy into the cells of Column A based on the information in the table of tab 1.
I.e the table shows that "Mark" has the number 33 in Cell B2 for the number 1, the Macro would then auto populate 33 cells in Column A of tab 2 for every corresponding '1' in Column E. It will stop when the count formula in cell C2 on tab 1 has counted the correct number needed.
It will then move onto the next name until it has auto-populated Column A on tab 2 for all 1's in Column E. It will then move onto all 2's.
Also to consider is if there is an error, in that there were not enough 1's available for the numbers entered on tab 1 as the figures were rounded up. It should just populate as many that are available.
I'm sorry if the above sounds very confusing but hopefully have conveyed what I am trying to do. I have very basic Macro knowledge so this will help out a lot and cut down on a lot of wasted time.
Any help will be greatly appreciated.
Many thanks for looking.