Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How can get values from another cell relative to current?

Folks,

Pl help me with this simple issue--

For a range of cells in a worksheet- I need to take values from other cells
on the same worksheet but located at a known relative position.

eg: Value in a cell = value in the cell 4 columns to it's right.
I tried =(COLUMN()-4)ROW()
but got an error. Seems straightforward but how can i do it? I need the
relative position as this has to be done on several parts of the worksheet
and a formula with variables would be easier.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 276
Default How can get values from another cell relative to current?

use the Offset syntax.
Range("A1").Offset(0,4)

Offset(0,4) = 4 Columns tot he Right
Offset(4,0) = 4 Rows Down
Offset(0,-4)=4 Columns to the Left
Offset(-4,0)=4 Rows Up
Offset(4,4)=4 Rows Down AND 4 Columns to the Right etc ....


Corey....
"ExcelMania" wrote in message
...
Folks,

Pl help me with this simple issue--

For a range of cells in a worksheet- I need to take values from other
cells
on the same worksheet but located at a known relative position.

eg: Value in a cell = value in the cell 4 columns to it's right.
I tried =(COLUMN()-4)ROW()
but got an error. Seems straightforward but how can i do it? I need the
relative position as this has to be done on several parts of the worksheet
and a formula with variables would be easier.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How can get values from another cell relative to current?

Thanks Corey-I will try this out and let you know.

"Corey" wrote:

use the Offset syntax.
Range("A1").Offset(0,4)

Offset(0,4) = 4 Columns tot he Right
Offset(4,0) = 4 Rows Down
Offset(0,-4)=4 Columns to the Left
Offset(-4,0)=4 Rows Up
Offset(4,4)=4 Rows Down AND 4 Columns to the Right etc ....


Corey....
"ExcelMania" wrote in message
...
Folks,

Pl help me with this simple issue--

For a range of cells in a worksheet- I need to take values from other
cells
on the same worksheet but located at a known relative position.

eg: Value in a cell = value in the cell 4 columns to it's right.
I tried =(COLUMN()-4)ROW()
but got an error. Seems straightforward but how can i do it? I need the
relative position as this has to be done on several parts of the worksheet
and a formula with variables would be easier.




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
Relative/Current Cell Reference in Hyperlinks cncf Excel Discussion (Misc queries) 0 June 1st 08 09:46 PM
Adding values stored at relative cell references tc Excel Programming 1 May 17th 08 09:11 PM
Relative reference to current cell? Brian Herbert Withun Excel Programming 3 November 7th 07 09:22 PM
Macro to run relative to current selected cell MahD Excel Discussion (Misc queries) 3 December 11th 06 06:18 AM
Replacing Linked Cell Values w/ Current Values TomCat Excel Worksheet Functions 6 April 10th 06 12:20 PM


All times are GMT +1. The time now is 04:49 PM.

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

About Us

"It's about Microsoft Excel"