Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old December 1st 04, 04:39 PM
Bob
 
Posts: n/a
Default Passing Cell Address to Offset

The following function returns the cell address I want to use in an offset
function:

=ADDRESS(MATCH(C$8,C$10:C$28,0)+8,D$1,4)

however, if I imbed this function in the first argument of the offset
function i.e.

OFFSET(ADDRESS(MATCH(C$8,C$10:C$28,0)+8,D$1,4),-9,0,1,1)

I get "The formula you typed contains an error." Any suggestions?

  #2   Report Post  
Old December 1st 04, 04:55 PM
Peo Sjoblom
 
Posts: n/a
Default

Try

=OFFSET(INDIRECT(ADDRESS(MATCH(C$8,C$10:C$28,0)+8, D$1,4)),-9,0,1,1)

having said that there is probably better to skip INDIRECT and ADDRESS and
use the match and the other data directly in either OFFSET or INDEX, this is
like swimming to the other side of the river to get a drink

For instance this

=OFFSET(A1,MATCH(C$8,C$10:C$28,0)+8-1,D1-1)

would return what's in

=ADDRESS(MATCH(C$8,C$10:C$28,0)+8,D$1,4)

meaning

=OFFSET(A1,MATCH(C$8,C$10:C$28,0)-2,D1-1)

will return

=OFFSET(INDIRECT(ADDRESS(MATCH(C$8,C$10:C$28,0)+8, D$1,4)),-9,0,1,1)




Regards,

Peo Sjoblom


"Bob" wrote:

The following function returns the cell address I want to use in an offset
function:

=ADDRESS(MATCH(C$8,C$10:C$28,0)+8,D$1,4)

however, if I imbed this function in the first argument of the offset
function i.e.

OFFSET(ADDRESS(MATCH(C$8,C$10:C$28,0)+8,D$1,4),-9,0,1,1)

I get "The formula you typed contains an error." Any suggestions?

  #3   Report Post  
Old December 1st 04, 04:56 PM
Don Guillett
 
Posts: n/a
Default

Use match to find the row and then use offset from a given to use the match.
look at help for offset to see what I mean
=offset(a1,matchrow,column)

--
Don Guillett
SalesAid Software

"Bob" wrote in message
...
The following function returns the cell address I want to use in an offset
function:

=ADDRESS(MATCH(C$8,C$10:C$28,0)+8,D$1,4)

however, if I imbed this function in the first argument of the offset
function i.e.

OFFSET(ADDRESS(MATCH(C$8,C$10:C$28,0)+8,D$1,4),-9,0,1,1)

I get "The formula you typed contains an error." Any suggestions?





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
look up a value that results in a cell address outlook help New Users to Excel 7 January 26th 05 10:21 PM
Concatenate cells without specifying/writing cell address individually Hari Excel Discussion (Misc queries) 4 January 3rd 05 06:05 PM
How do I dynamically retrieve the cell address of the last cell t. Nancy Excel Discussion (Misc queries) 1 December 20th 04 02:52 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM
How do I link an identical cell address across multiple worksheet. Charlie Courier Excel Worksheet Functions 1 November 24th 04 04:40 PM


All times are GMT +1. The time now is 05:37 AM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017