Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 74
Default What's causing error message?

Hello all,

The formula: =ADDRESS(2,MATCH(MAX(B2:AY2),A2:AY2,0),4) returns the cell
address (G2) of the largest number in B2:AY2 correctly.

The formula: =OFFSET(G2,-1,0) returns the name of the team in G1 that has
that highest total.

So why, when I replace the "G2" in the OFFSET formula with the ADDRESS
formula:
=OFFSET(ADDRESS(2,MATCH(MAX(B2:AY2),A2:AY2,0),4),-1,0) do I get an error
message?

Thanks for any ideas.

--
Jim T
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default What's causing error message?

The error is cause because OFFSET can't take the textstring derived from a
formula and turn it into a
valid cell reference. You would need to use INDIRECT

=OFFSET(INDIRECT(ADDRESS(2,MATCH(MAX(B2:AY2),A2:AY 2,0),4)),-1,0)


however this is not a good way to solve this, much better to use

=INDEX(A1:AY1,MATCH(MAX(B2:AY2),A2:AY2,0))

a much more efficient formula and it is not volatile either

--


Regards,


Peo Sjoblom

"Jim Tibbetts" wrote in message
...
Hello all,

The formula: =ADDRESS(2,MATCH(MAX(B2:AY2),A2:AY2,0),4) returns the cell
address (G2) of the largest number in B2:AY2 correctly.

The formula: =OFFSET(G2,-1,0) returns the name of the team in G1 that has
that highest total.

So why, when I replace the "G2" in the OFFSET formula with the ADDRESS
formula:
=OFFSET(ADDRESS(2,MATCH(MAX(B2:AY2),A2:AY2,0),4),-1,0) do I get an error
message?

Thanks for any ideas.

--
Jim T



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default What's causing error message?

Doh! cause should be because

--


Regards,


Peo Sjoblom

"Peo Sjoblom" wrote in message
...
The error is cause because OFFSET can't take the textstring derived from a
formula and turn it into a
valid cell reference. You would need to use INDIRECT

=OFFSET(INDIRECT(ADDRESS(2,MATCH(MAX(B2:AY2),A2:AY 2,0),4)),-1,0)


however this is not a good way to solve this, much better to use

=INDEX(A1:AY1,MATCH(MAX(B2:AY2),A2:AY2,0))

a much more efficient formula and it is not volatile either

--


Regards,


Peo Sjoblom

"Jim Tibbetts" wrote in message
...
Hello all,

The formula: =ADDRESS(2,MATCH(MAX(B2:AY2),A2:AY2,0),4) returns the cell
address (G2) of the largest number in B2:AY2 correctly.

The formula: =OFFSET(G2,-1,0) returns the name of the team in G1 that has
that highest total.

So why, when I replace the "G2" in the OFFSET formula with the ADDRESS
formula:
=OFFSET(ADDRESS(2,MATCH(MAX(B2:AY2),A2:AY2,0),4),-1,0) do I get an error
message?

Thanks for any ideas.

--
Jim T





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 74
Default What's causing error message?

Peo - Many thanks for your help. Both formulas return the result I need.
--
Jim T


"Peo Sjoblom" wrote:

The error is cause because OFFSET can't take the textstring derived from a
formula and turn it into a
valid cell reference. You would need to use INDIRECT

=OFFSET(INDIRECT(ADDRESS(2,MATCH(MAX(B2:AY2),A2:AY 2,0),4)),-1,0)


however this is not a good way to solve this, much better to use

=INDEX(A1:AY1,MATCH(MAX(B2:AY2),A2:AY2,0))

a much more efficient formula and it is not volatile either

--


Regards,


Peo Sjoblom

"Jim Tibbetts" wrote in message
...
Hello all,

The formula: =ADDRESS(2,MATCH(MAX(B2:AY2),A2:AY2,0),4) returns the cell
address (G2) of the largest number in B2:AY2 correctly.

The formula: =OFFSET(G2,-1,0) returns the name of the team in G1 that has
that highest total.

So why, when I replace the "G2" in the OFFSET formula with the ADDRESS
formula:
=OFFSET(ADDRESS(2,MATCH(MAX(B2:AY2),A2:AY2,0),4),-1,0) do I get an error
message?

Thanks for any ideas.

--
Jim T




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default What's causing error message?

You are welcome, I notice that you probably have a typo, shouldn't this


MATCH(MAX(B2:AY2),A2:AY2,0)


be


MATCH(MAX(A2:AY2),A2:AY2,0))

?

--


Regards,


Peo Sjoblom

"Jim Tibbetts" wrote in message
...
Peo - Many thanks for your help. Both formulas return the result I need.
--
Jim T


"Peo Sjoblom" wrote:

The error is cause because OFFSET can't take the textstring derived from
a
formula and turn it into a
valid cell reference. You would need to use INDIRECT

=OFFSET(INDIRECT(ADDRESS(2,MATCH(MAX(B2:AY2),A2:AY 2,0),4)),-1,0)


however this is not a good way to solve this, much better to use

=INDEX(A1:AY1,MATCH(MAX(B2:AY2),A2:AY2,0))

a much more efficient formula and it is not volatile either

--


Regards,


Peo Sjoblom

"Jim Tibbetts" wrote in message
...
Hello all,

The formula: =ADDRESS(2,MATCH(MAX(B2:AY2),A2:AY2,0),4) returns the cell
address (G2) of the largest number in B2:AY2 correctly.

The formula: =OFFSET(G2,-1,0) returns the name of the team in G1 that
has
that highest total.

So why, when I replace the "G2" in the OFFSET formula with the ADDRESS
formula:
=OFFSET(ADDRESS(2,MATCH(MAX(B2:AY2),A2:AY2,0),4),-1,0) do I get an
error
message?

Thanks for any ideas.

--
Jim T






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
Named ranges are causing a #REF error Arlen Excel Discussion (Misc queries) 3 July 30th 08 10:18 PM
Query causing #ref error in spreadsheet endro Excel Discussion (Misc queries) 0 May 14th 08 12:03 AM
cells without values causing error message karen Excel Discussion (Misc queries) 6 January 11th 08 06:39 PM
VLOOKUP Formula causing an error japc90 Excel Discussion (Misc queries) 2 July 25th 06 11:36 PM
Formula Causing a Save Error Message Mr Mike Excel Worksheet Functions 2 September 1st 05 06:01 PM


All times are GMT +1. The time now is 10:14 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"