How do I write a macro that means that:
if cell A2 displays 1, cell G2 displays whatever cell R1 displays
else if cell A2 displays 2, cell G2 displays whatever cell R2 displays
else if cell A2 displays 3, cell G2 displays whatever cell R3 displays
else if cell A2 displays 4, cell G2 displays whatever cell R4 displays
...
...
...
else if cell A2 displays 7051, cell G2 displays whatever cell R7051 displays.
Without using the 7051 "If" statements.
I was thinking something like a counting loop, but I don't know how to do that in vb. Nor do I know how to refer to cells in Excel using vb, so if somebody could show me how that would work I would greatly appreciate it.
Many Thanks.
Bookmarks