upendra2206
New Member
- Joined
- Jul 17, 2016
- Messages
- 44
Table 1: Sheet 1
<tbody>
</tbody>
Table 2: Sheet 2 -Before Macro
<tbody>
</tbody>
Table 2: Sheet 2 - After Macro
<tbody>
</tbody>
I have a macro in Sheet 1 to populate the data in Table 1. Now I want a macro for Table 2 in Sheet 2 such that it counts the number of rows in Table 1 i.e. 3 in this case and insert the Serial Nos in Table 2 but starting with 3. i.e. 3,4,5 since there are three rows in Table 1. Had the number of rows been 4 in Table 1, I would have wanted 3,4,5,6 in Table 2 in employee details. The reason for starting the serial numbers from 3 is that I have used these serial Nos of Table as a Row index number in my HLookup formula in the remaining cell. Is there any away of doing it?
Thanks in Advance
Sr No | Salary | Gender | AGE |
1 | 2000 | M | 23 |
2 | 3000 | M | 24 |
3 | 4000 | F | 25 |
<tbody>
</tbody>
Table 2: Sheet 2 -Before Macro
Employee Details | Eligibility |
3 | |
4 | |
5 |
<tbody>
</tbody>
Table 2: Sheet 2 - After Macro
Employee Details | Eligibility |
3 | |
4 | |
5 |
<tbody>
</tbody>
I have a macro in Sheet 1 to populate the data in Table 1. Now I want a macro for Table 2 in Sheet 2 such that it counts the number of rows in Table 1 i.e. 3 in this case and insert the Serial Nos in Table 2 but starting with 3. i.e. 3,4,5 since there are three rows in Table 1. Had the number of rows been 4 in Table 1, I would have wanted 3,4,5,6 in Table 2 in employee details. The reason for starting the serial numbers from 3 is that I have used these serial Nos of Table as a Row index number in my HLookup formula in the remaining cell. Is there any away of doing it?
Thanks in Advance