Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 138
Default Kind of like offset.....

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Different kind of rounding Sarah_Lund Excel Discussion (Misc queries) 5 December 21st 08 05:58 PM
Compare Cell Values, Offset(-1,0), Offset(-1,-1), and xlFillDefaul RyGuy Excel Worksheet Functions 2 September 28th 07 10:54 PM
How to do for this kind of formula? kelvin Excel Discussion (Misc queries) 2 June 12th 07 04:29 AM
What kind of Formula?? Mike R Excel Discussion (Misc queries) 0 February 17th 05 04:17 AM
Different Kind of Progress Bar... Denny Behnfeldt Excel Programming 8 February 10th 04 03:09 PM


All times are GMT +1. The time now is 10:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"