View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default Kind of like offset.....

Hi
try:
myVar2=Sheet("sheet1").Range("B5").offset(0,myvar1 ).value

and
myVar2=Sheet("sheet1").Range("B5").offset(myvar1,0 ).value


--
Regards
Frank Kabel
Frankfurt, Germany


Bruce wrote:
Say I have the following variables

myVar1 = 1
myVar2 = Sheet("sheet1").Range("B5")

how do I get myVar2 to equal Sheet("sheet1").Range("C5") using

myVar1

also;

how do I get myVar2 to equal Sheet("sheet1").Range("B6") using

myVar1

Bruce