ReJig
New Member
- Joined
- Jul 8, 2009
- Messages
- 14
Re-post with, hopefully, better clarity.
I'm fairly new to VBA. I'm working with the sheet below:
Response_Rates
<TABLE style="BACKGROUND-COLOR: #ffffff; PADDING-LEFT: 2pt; PADDING-RIGHT: 2pt; FONT-FAMILY: Arial,Arial; FONT-SIZE: 10pt" border=1 cellSpacing=0 cellPadding=0><COLGROUP><COL style="WIDTH: 30px; FONT-WEIGHT: bold"><COL style="WIDTH: 180px"><COL style="WIDTH: 145px"><COL style="WIDTH: 145px"><COL style="WIDTH: 145px"></COLGROUP><TBODY><TR style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt; FONT-WEIGHT: bold"><TD> </TD><TD>A</TD><TD>B</TD><TD>C</TD><TD>D</TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">1</TD><TD>Unit Names</TD><TD>Sample Size</TD><TD>Population</TD><TD>Rate</TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">2</TD><TD>Finance and Regulation</TD><TD style="TEXT-ALIGN: right">53</TD><TD> </TD><TD> </TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">3</TD><TD>Asset Management</TD><TD style="TEXT-ALIGN: right">66</TD><TD> </TD><TD> </TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">4</TD><TD>Business Improvement</TD><TD style="TEXT-ALIGN: right">14</TD><TD> </TD><TD> </TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">5</TD><TD>Operations</TD><TD style="TEXT-ALIGN: right">178</TD><TD> </TD><TD> </TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">6</TD><TD>Commercial</TD><TD style="TEXT-ALIGN: right">15</TD><TD> </TD><TD> </TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">7</TD><TD>Customer Services</TD><TD style="TEXT-ALIGN: right">43</TD><TD> </TD><TD> </TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">8</TD><TD>CIO ICT</TD><TD style="TEXT-ALIGN: right">11</TD><TD> </TD><TD> </TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">9</TD><TD>Human Resources</TD><TD style="TEXT-ALIGN: right">21</TD><TD> </TD><TD> </TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">10</TD><TD>Engineering Procurement</TD><TD style="TEXT-ALIGN: right">45</TD><TD> </TD><TD> </TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">11</TD><TD>Other</TD><TD style="TEXT-ALIGN: right">19</TD><TD> </TD><TD> </TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">12</TD><TD>Communications</TD><TD style="TEXT-ALIGN: right">8</TD><TD> </TD><TD> </TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">13</TD><TD>Company Secretariat</TD><TD style="TEXT-ALIGN: right">3</TD><TD> </TD><TD> </TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">14</TD><TD>CEO Office</TD><TD style="TEXT-ALIGN: right">3</TD><TD> </TD><TD> </TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">15</TD><TD>Missing</TD><TD style="TEXT-ALIGN: right">6</TD><TD> </TD><TD> </TD></TR></TBODY></TABLE>
Excel tables to the web >> http://www.excel-jeanie-html.de/index.php?f=1" target="_blank"> Excel Jeanie HTML 4
I'm trying to create a macro that produces a series of InputBoxes for each row that has a unit name. Note that the number of unit names and the actual names will change from project to project, so the macro can not specify in advance. The macro would have to count the number of rows in Column A, which would specify the number of UnitBoxes to be created.
So, for example, the first UnitBox would read something like:
"Please enter the Population number associated with Finance and Regulation. Note, the sample size is 53".
The user would then enter the Population number, which would then be placed in C2. Then a new InputBox would be prompted based on the cell values in row 3 (etc), until all rows with values have been done.
I know, I could use a message box to prompt the user to go to the sheet and enter the data, or transpose the rows into columns and use a Data Form, but for various reasons, I'm currently stuck with trying to do it with a series of InputBoxes.
Thanks for any advice.
I'm fairly new to VBA. I'm working with the sheet below:
Response_Rates
<TABLE style="BACKGROUND-COLOR: #ffffff; PADDING-LEFT: 2pt; PADDING-RIGHT: 2pt; FONT-FAMILY: Arial,Arial; FONT-SIZE: 10pt" border=1 cellSpacing=0 cellPadding=0><COLGROUP><COL style="WIDTH: 30px; FONT-WEIGHT: bold"><COL style="WIDTH: 180px"><COL style="WIDTH: 145px"><COL style="WIDTH: 145px"><COL style="WIDTH: 145px"></COLGROUP><TBODY><TR style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt; FONT-WEIGHT: bold"><TD> </TD><TD>A</TD><TD>B</TD><TD>C</TD><TD>D</TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">1</TD><TD>Unit Names</TD><TD>Sample Size</TD><TD>Population</TD><TD>Rate</TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">2</TD><TD>Finance and Regulation</TD><TD style="TEXT-ALIGN: right">53</TD><TD> </TD><TD> </TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">3</TD><TD>Asset Management</TD><TD style="TEXT-ALIGN: right">66</TD><TD> </TD><TD> </TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">4</TD><TD>Business Improvement</TD><TD style="TEXT-ALIGN: right">14</TD><TD> </TD><TD> </TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">5</TD><TD>Operations</TD><TD style="TEXT-ALIGN: right">178</TD><TD> </TD><TD> </TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">6</TD><TD>Commercial</TD><TD style="TEXT-ALIGN: right">15</TD><TD> </TD><TD> </TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">7</TD><TD>Customer Services</TD><TD style="TEXT-ALIGN: right">43</TD><TD> </TD><TD> </TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">8</TD><TD>CIO ICT</TD><TD style="TEXT-ALIGN: right">11</TD><TD> </TD><TD> </TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">9</TD><TD>Human Resources</TD><TD style="TEXT-ALIGN: right">21</TD><TD> </TD><TD> </TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">10</TD><TD>Engineering Procurement</TD><TD style="TEXT-ALIGN: right">45</TD><TD> </TD><TD> </TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">11</TD><TD>Other</TD><TD style="TEXT-ALIGN: right">19</TD><TD> </TD><TD> </TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">12</TD><TD>Communications</TD><TD style="TEXT-ALIGN: right">8</TD><TD> </TD><TD> </TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">13</TD><TD>Company Secretariat</TD><TD style="TEXT-ALIGN: right">3</TD><TD> </TD><TD> </TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">14</TD><TD>CEO Office</TD><TD style="TEXT-ALIGN: right">3</TD><TD> </TD><TD> </TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">15</TD><TD>Missing</TD><TD style="TEXT-ALIGN: right">6</TD><TD> </TD><TD> </TD></TR></TBODY></TABLE>
Excel tables to the web >> http://www.excel-jeanie-html.de/index.php?f=1" target="_blank"> Excel Jeanie HTML 4
I'm trying to create a macro that produces a series of InputBoxes for each row that has a unit name. Note that the number of unit names and the actual names will change from project to project, so the macro can not specify in advance. The macro would have to count the number of rows in Column A, which would specify the number of UnitBoxes to be created.
So, for example, the first UnitBox would read something like:
"Please enter the Population number associated with Finance and Regulation. Note, the sample size is 53".
The user would then enter the Population number, which would then be placed in C2. Then a new InputBox would be prompted based on the cell values in row 3 (etc), until all rows with values have been done.
I know, I could use a message box to prompt the user to go to the sheet and enter the data, or transpose the rows into columns and use a Data Form, but for various reasons, I'm currently stuck with trying to do it with a series of InputBoxes.
Thanks for any advice.