Hi All,
Am novice to excel, am trying to insert a new row aftert the last active row and at the same time i need to increment the column value to the newly added row.
ex :
<table width="588" border="0" cellpadding="0" cellspacing="0"><col style="width: 48pt;" width="64"> <col style="width: 169pt;" width="225"> <col style="width: 110pt;" width="146"> <col style="width: 115pt;" width="153"> <tbody><tr style="height: 25.5pt;" height="34"> <td class="xl67" style="height: 25.5pt; width: 48pt;" width="64" height="34">TC#</td> <td class="xl67" style="border-left: medium none; width: 169pt;" width="225">
Test Execution Steps</td> <td class="xl67" style="border-left: medium none; width: 110pt;" width="146">
Expected Result</td> <td class="xl67" style="border-left: medium none; width: 115pt;" width="153">Actual Result</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl68" style="height: 12.75pt; width: 48pt;" width="64" align="right" height="17">1
</td> <td class="xl65" style="border-top: medium none; width: 169pt;" width="225">abc</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 110pt;" width="146">abc</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 115pt;" width="153">xxx</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl68" style="height: 12.75pt; width: 48pt;" width="64" align="right" height="17">2
</td> <td class="xl65" style="border-top: medium none; width: 169pt;" width="225">abc</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 110pt;" width="146">abc</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 115pt;" width="153">xxx</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl68" style="height: 12.75pt; width: 48pt;" width="64" align="right" height="17">3
</td> <td class="xl65" style="border-top: medium none; width: 169pt;" width="225">abc</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 110pt;" width="146">abc</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 115pt;" width="153">xxx</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl69" style="height: 12.75pt; border-top: medium none; width: 48pt;" width="64" align="right" height="17">
</td><td class="xl65" style="border-top: medium none; width: 169pt;" width="225">
</td><td class="xl65" style="border-top: medium none; border-left: medium none; width: 110pt;" width="146">
</td><td class="xl65" style="border-top: medium none; border-left: medium none; width: 115pt;" width="153">
</td></tr><tr style="height: 12.75pt;" height="17"><td class="xl69" style="height: 12.75pt; border-top: medium none; width: 48pt;" width="64" align="right" height="17">
</td><td class="xl65" style="border-top: medium none; width: 169pt;" width="225">
</td><td class="xl65" style="border-top: medium none; border-left: medium none; width: 110pt;" width="146">
</td><td class="xl66" style="border-top: medium none; width: 115pt;" width="153">
</td></tr></tbody></table><table width="1097" border="0" cellpadding="0" cellspacing="0"><tbody><tr style="height: 25.5pt;" height="34"><td class="xl68" style="height: 25.5pt; width: 28pt;" width="37" height="34">
</td> <td class="xl68" style="border-left: medium none; width: 155pt;" width="207">Now, here i want to insert new row after row 3 and have to increment the column value (TC#) to 4 after clicking on InsertNewRow button.
Macro Code used :
<Code>
Sub InsertNewRow ()
ActiveCell.Offset(Selection.Rows.Count, 0).EntireRow.Insert
End Sub
Can anyone help me on this .....
Many Thanks,
BobR
</td> <td class="xl68" style="border-left: medium none; width: 155pt;" width="207">
</td> <td class="xl68" style="border-left: medium none; width: 155pt;" width="207">
</td> <td class="xl68" style="border-left: medium none; width: 35pt;" width="46">
</td> <td class="xl68" style="border-left: medium none; width: 55pt;" width="73">
</td> <td class="xl68" style="border-left: medium none; width: 40pt;" width="53">
</td> <td class="xl68" style="border-left: medium none; width: 40pt;" width="53">
</td> <td class="xl69" style="border-left: medium none; width: 161pt;" width="214">
</td> </tr> <tr style="height: 13.5pt;" height="18"> <td colspan="9" class="xl81" style="height: 13.5pt;" height="18">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl71" style="height: 12.75pt; width: 28pt;" width="37" align="right" height="17">
</td> <td class="xl65" style="width: 155pt;" width="207">
</td> <td class="xl65" style="border-left: medium none; width: 155pt;" width="207">
</td> <td class="xl65" style="border-left: medium none; width: 155pt;" width="207">
</td> <td class="xl67" style="width: 35pt;" width="46">
</td> <td class="xl72" style="border-left: medium none; width: 55pt;" width="73">
</td> <td class="xl73" style="border-left: medium none; width: 40pt;" width="53">
</td> <td class="xl74" style="border-left: medium none; width: 40pt;" width="53">
</td> <td class="xl75" style="border-top: medium none; border-left: medium none; width: 161pt;" width="214">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl71" style="height: 12.75pt; width: 28pt;" width="37" align="right" height="17">
</td> <td class="xl65" style="border-top: medium none; width: 155pt;" width="207">
</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 155pt;" width="207">
</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 155pt;" width="207">
</td> <td class="xl67" style="border-top: medium none; width: 35pt;" width="46">
</td> <td class="xl72" style="border-left: medium none; width: 55pt;" width="73">
</td> <td class="xl73" style="border-left: medium none; width: 40pt;" width="53">
</td> <td class="xl74" style="border-left: medium none; width: 40pt;" width="53">
</td> <td class="xl76" style="border-left: medium none; width: 161pt;" width="214">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl71" style="height: 12.75pt; width: 28pt;" width="37" align="right" height="17">
</td> <td class="xl65" style="border-top: medium none; width: 155pt;" width="207">
</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 155pt;" width="207">
</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 155pt;" width="207">
</td> <td class="xl67" style="border-top: medium none; width: 35pt;" width="46">
</td> <td class="xl72" style="border-left: medium none; width: 55pt;" width="73">
</td> <td class="xl73" style="border-left: medium none; width: 40pt;" width="53">
</td> <td class="xl74" style="border-left: medium none; width: 40pt;" width="53">
</td> <td class="xl76" style="border-left: medium none; width: 161pt;" width="214">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl71" style="height: 12.75pt; width: 28pt;" width="37" align="right" height="17">
</td> <td class="xl65" style="border-top: medium none; width: 155pt;" width="207">
</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 155pt;" width="207">
</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 155pt;" width="207">
</td> <td class="xl67" style="border-top: medium none; width: 35pt;" width="46">
</td> <td class="xl72" style="border-left: medium none; width: 55pt;" width="73">
</td> <td class="xl73" style="border-left: medium none; width: 40pt;" width="53"> </td> <td class="xl74" style="border-left: medium none; width: 40pt;" width="53"> </td> <td class="xl76" style="border-left: medium none; width: 161pt;" width="214"> </td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl77" style="height: 12.75pt; border-top: medium none; width: 28pt;" width="37" align="right" height="17">
</td> <td class="xl65" style="border-top: medium none; width: 155pt;" width="207">
</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 155pt;" width="207">
</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 155pt;" width="207">
</td> <td class="xl78" style="border-top: medium none; width: 35pt;" width="46">
</td> <td class="xl79" style="border-top: medium none; border-left: medium none; width: 55pt;" width="73">
</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 40pt;" width="53"> </td> <td class="xl74" style="border-left: medium none; width: 40pt;" width="53"> </td> <td class="xl80" style="border-top: medium none; border-left: medium none; width: 161pt;" width="214"> </td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl77" style="height: 12.75pt; border-top: medium none; width: 28pt;" width="37" align="right" height="17">
</td> <td class="xl65" style="border-top: medium none; width: 155pt;" width="207">
</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 155pt;" width="207">
</td> <td class="xl67" style="border-top: medium none; width: 155pt;" width="207">
</td> <td class="xl78" style="border-top: medium none; width: 35pt;" width="46"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none; width: 55pt;" width="73"> </td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 40pt;" width="53"> </td> <td class="xl74" style="border-left: medium none; width: 40pt;" width="53"> </td> <td class="xl80" style="border-top: medium none; border-left: medium none; width: 161pt;" width="214"> </td> </tr> </tbody></table>
Am novice to excel, am trying to insert a new row aftert the last active row and at the same time i need to increment the column value to the newly added row.
ex :
<table width="588" border="0" cellpadding="0" cellspacing="0"><col style="width: 48pt;" width="64"> <col style="width: 169pt;" width="225"> <col style="width: 110pt;" width="146"> <col style="width: 115pt;" width="153"> <tbody><tr style="height: 25.5pt;" height="34"> <td class="xl67" style="height: 25.5pt; width: 48pt;" width="64" height="34">TC#</td> <td class="xl67" style="border-left: medium none; width: 169pt;" width="225">
Test Execution Steps</td> <td class="xl67" style="border-left: medium none; width: 110pt;" width="146">
Expected Result</td> <td class="xl67" style="border-left: medium none; width: 115pt;" width="153">Actual Result</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl68" style="height: 12.75pt; width: 48pt;" width="64" align="right" height="17">1
</td> <td class="xl65" style="border-top: medium none; width: 169pt;" width="225">abc</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 110pt;" width="146">abc</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 115pt;" width="153">xxx</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl68" style="height: 12.75pt; width: 48pt;" width="64" align="right" height="17">2
</td> <td class="xl65" style="border-top: medium none; width: 169pt;" width="225">abc</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 110pt;" width="146">abc</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 115pt;" width="153">xxx</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl68" style="height: 12.75pt; width: 48pt;" width="64" align="right" height="17">3
</td> <td class="xl65" style="border-top: medium none; width: 169pt;" width="225">abc</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 110pt;" width="146">abc</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 115pt;" width="153">xxx</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl69" style="height: 12.75pt; border-top: medium none; width: 48pt;" width="64" align="right" height="17">
</td><td class="xl65" style="border-top: medium none; width: 169pt;" width="225">
</td><td class="xl65" style="border-top: medium none; border-left: medium none; width: 110pt;" width="146">
</td><td class="xl65" style="border-top: medium none; border-left: medium none; width: 115pt;" width="153">
</td></tr><tr style="height: 12.75pt;" height="17"><td class="xl69" style="height: 12.75pt; border-top: medium none; width: 48pt;" width="64" align="right" height="17">
</td><td class="xl65" style="border-top: medium none; width: 169pt;" width="225">
</td><td class="xl65" style="border-top: medium none; border-left: medium none; width: 110pt;" width="146">
</td><td class="xl66" style="border-top: medium none; width: 115pt;" width="153">
</td></tr></tbody></table><table width="1097" border="0" cellpadding="0" cellspacing="0"><tbody><tr style="height: 25.5pt;" height="34"><td class="xl68" style="height: 25.5pt; width: 28pt;" width="37" height="34">
</td> <td class="xl68" style="border-left: medium none; width: 155pt;" width="207">Now, here i want to insert new row after row 3 and have to increment the column value (TC#) to 4 after clicking on InsertNewRow button.
Macro Code used :
<Code>
Sub InsertNewRow ()
ActiveCell.Offset(Selection.Rows.Count, 0).EntireRow.Insert
End Sub
Can anyone help me on this .....
Many Thanks,
BobR
</td> <td class="xl68" style="border-left: medium none; width: 155pt;" width="207">
</td> <td class="xl68" style="border-left: medium none; width: 155pt;" width="207">
</td> <td class="xl68" style="border-left: medium none; width: 35pt;" width="46">
</td> <td class="xl68" style="border-left: medium none; width: 55pt;" width="73">
</td> <td class="xl68" style="border-left: medium none; width: 40pt;" width="53">
</td> <td class="xl68" style="border-left: medium none; width: 40pt;" width="53">
</td> <td class="xl69" style="border-left: medium none; width: 161pt;" width="214">
</td> </tr> <tr style="height: 13.5pt;" height="18"> <td colspan="9" class="xl81" style="height: 13.5pt;" height="18">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl71" style="height: 12.75pt; width: 28pt;" width="37" align="right" height="17">
</td> <td class="xl65" style="width: 155pt;" width="207">
</td> <td class="xl65" style="border-left: medium none; width: 155pt;" width="207">
</td> <td class="xl65" style="border-left: medium none; width: 155pt;" width="207">
</td> <td class="xl67" style="width: 35pt;" width="46">
</td> <td class="xl72" style="border-left: medium none; width: 55pt;" width="73">
</td> <td class="xl73" style="border-left: medium none; width: 40pt;" width="53">
</td> <td class="xl74" style="border-left: medium none; width: 40pt;" width="53">
</td> <td class="xl75" style="border-top: medium none; border-left: medium none; width: 161pt;" width="214">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl71" style="height: 12.75pt; width: 28pt;" width="37" align="right" height="17">
</td> <td class="xl65" style="border-top: medium none; width: 155pt;" width="207">
</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 155pt;" width="207">
</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 155pt;" width="207">
</td> <td class="xl67" style="border-top: medium none; width: 35pt;" width="46">
</td> <td class="xl72" style="border-left: medium none; width: 55pt;" width="73">
</td> <td class="xl73" style="border-left: medium none; width: 40pt;" width="53">
</td> <td class="xl74" style="border-left: medium none; width: 40pt;" width="53">
</td> <td class="xl76" style="border-left: medium none; width: 161pt;" width="214">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl71" style="height: 12.75pt; width: 28pt;" width="37" align="right" height="17">
</td> <td class="xl65" style="border-top: medium none; width: 155pt;" width="207">
</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 155pt;" width="207">
</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 155pt;" width="207">
</td> <td class="xl67" style="border-top: medium none; width: 35pt;" width="46">
</td> <td class="xl72" style="border-left: medium none; width: 55pt;" width="73">
</td> <td class="xl73" style="border-left: medium none; width: 40pt;" width="53">
</td> <td class="xl74" style="border-left: medium none; width: 40pt;" width="53">
</td> <td class="xl76" style="border-left: medium none; width: 161pt;" width="214">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl71" style="height: 12.75pt; width: 28pt;" width="37" align="right" height="17">
</td> <td class="xl65" style="border-top: medium none; width: 155pt;" width="207">
</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 155pt;" width="207">
</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 155pt;" width="207">
</td> <td class="xl67" style="border-top: medium none; width: 35pt;" width="46">
</td> <td class="xl72" style="border-left: medium none; width: 55pt;" width="73">
</td> <td class="xl73" style="border-left: medium none; width: 40pt;" width="53"> </td> <td class="xl74" style="border-left: medium none; width: 40pt;" width="53"> </td> <td class="xl76" style="border-left: medium none; width: 161pt;" width="214"> </td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl77" style="height: 12.75pt; border-top: medium none; width: 28pt;" width="37" align="right" height="17">
</td> <td class="xl65" style="border-top: medium none; width: 155pt;" width="207">
</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 155pt;" width="207">
</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 155pt;" width="207">
</td> <td class="xl78" style="border-top: medium none; width: 35pt;" width="46">
</td> <td class="xl79" style="border-top: medium none; border-left: medium none; width: 55pt;" width="73">
</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 40pt;" width="53"> </td> <td class="xl74" style="border-left: medium none; width: 40pt;" width="53"> </td> <td class="xl80" style="border-top: medium none; border-left: medium none; width: 161pt;" width="214"> </td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl77" style="height: 12.75pt; border-top: medium none; width: 28pt;" width="37" align="right" height="17">
</td> <td class="xl65" style="border-top: medium none; width: 155pt;" width="207">
</td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 155pt;" width="207">
</td> <td class="xl67" style="border-top: medium none; width: 155pt;" width="207">
</td> <td class="xl78" style="border-top: medium none; width: 35pt;" width="46"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none; width: 55pt;" width="73"> </td> <td class="xl65" style="border-top: medium none; border-left: medium none; width: 40pt;" width="53"> </td> <td class="xl74" style="border-left: medium none; width: 40pt;" width="53"> </td> <td class="xl80" style="border-top: medium none; border-left: medium none; width: 161pt;" width="214"> </td> </tr> </tbody></table>