Hi, is there a way I can use relative cell address in VBA? For example, in the following table:
<table style="border-collapse: collapse; width: 96pt;" border="0" cellpadding="0" cellspacing="0" width="128"><col style="width: 48pt;" span="2" width="64"> <tbody><tr style="height: 15pt;" height="20"> <td style="height: 15pt; width: 48pt;" height="20" width="64">
</td> <td style="width: 48pt;" width="64">value</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">item 1</td> <td>apple</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">item 2</td> <td>peach</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">item 3</td> <td>mango</td> </tr> </tbody></table>
Instead of use
Range("B4").Value = "mango"
to insert mango to cell B4, I can use an address that's one row under peach, or one column to the right of item 3?
Thanks for your help
<table style="border-collapse: collapse; width: 96pt;" border="0" cellpadding="0" cellspacing="0" width="128"><col style="width: 48pt;" span="2" width="64"> <tbody><tr style="height: 15pt;" height="20"> <td style="height: 15pt; width: 48pt;" height="20" width="64">
</td> <td style="width: 48pt;" width="64">value</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">item 1</td> <td>apple</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">item 2</td> <td>peach</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">item 3</td> <td>mango</td> </tr> </tbody></table>
Instead of use
Range("B4").Value = "mango"
to insert mango to cell B4, I can use an address that's one row under peach, or one column to the right of item 3?
Thanks for your help