Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Richard Buttrey
 
Posts: n/a
Default Help with Indirect function ?

I have a series of formulae across several columns like this

in say T10
=SUMIF(mqs_col,$N14,'Main Working Paper'!Z$15:Z$2033)

where the last reference (in this case Z15:Z2033) varies in each
column. The reference doesn't change consistently, i.e the formula in
the next column U10 is not to AA15:AA2033, but something else.

In T1 I have a formulae which evaluates to a cell reference, say
M$15

I need to substitute the reference to Col M found in T1, in place of
the reference to Z so that I end up with

=SUMIF(mqs_col,$N14,'Main Working Paper'!M$15:M$2033)

so that I can then copy this across many more columns, U,V W, X
etc...

It's not practical to use Find and Replace since the column references
are different and I have about 200 columns to change.

I'm sure an Indirect construction is required, something like

=INDIRECT("SUMIF(mqs_col,$N14,Main Working
Paper!"&left(T1,1)&"15:"&left(T1,1)&"2033")

but can't seem to get it quite right and get #REF!

Can anyone help please?

Usual TIA


__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Help with Indirect function ?

Hi!

Try this:

Will T1 always be a reference to row 15 ?

=SUMIF(mqs_col,N14,INDIRECT("'main working paper'!"&T1&":"&LEFT(T1)&"2033"))

Biff

"Richard Buttrey" wrote in
message ...
I have a series of formulae across several columns like this

in say T10
=SUMIF(mqs_col,$N14,'Main Working Paper'!Z$15:Z$2033)

where the last reference (in this case Z15:Z2033) varies in each
column. The reference doesn't change consistently, i.e the formula in
the next column U10 is not to AA15:AA2033, but something else.

In T1 I have a formulae which evaluates to a cell reference, say
M$15

I need to substitute the reference to Col M found in T1, in place of
the reference to Z so that I end up with

=SUMIF(mqs_col,$N14,'Main Working Paper'!M$15:M$2033)

so that I can then copy this across many more columns, U,V W, X
etc...

It's not practical to use Find and Replace since the column references
are different and I have about 200 columns to change.

I'm sure an Indirect construction is required, something like

=INDIRECT("SUMIF(mqs_col,$N14,Main Working
Paper!"&left(T1,1)&"15:"&left(T1,1)&"2033")

but can't seem to get it quite right and get #REF!

Can anyone help please?

Usual TIA


__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Help with Indirect function ?

Richard,

It would be better to put the whole range (M15:M2033) in T1 and use

=SUMIF(mqs_col,$N14,INDIRECT("'Main Working Paper'!"&T1))

or if you want a variable last row somehow, then at least the letter (M15:M)
and use

=SUMIF(mqs_col,$N14,INDIRECT("'Main Working Paper'!"&T1&"2033"))

just makes it easier to read and maintain.

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Richard Buttrey" wrote in
message ...
I have a series of formulae across several columns like this

in say T10
=SUMIF(mqs_col,$N14,'Main Working Paper'!Z$15:Z$2033)

where the last reference (in this case Z15:Z2033) varies in each
column. The reference doesn't change consistently, i.e the formula in
the next column U10 is not to AA15:AA2033, but something else.

In T1 I have a formulae which evaluates to a cell reference, say
M$15

I need to substitute the reference to Col M found in T1, in place of
the reference to Z so that I end up with

=SUMIF(mqs_col,$N14,'Main Working Paper'!M$15:M$2033)

so that I can then copy this across many more columns, U,V W, X
etc...

It's not practical to use Find and Replace since the column references
are different and I have about 200 columns to change.

I'm sure an Indirect construction is required, something like

=INDIRECT("SUMIF(mqs_col,$N14,Main Working
Paper!"&left(T1,1)&"15:"&left(T1,1)&"2033")

but can't seem to get it quite right and get #REF!

Can anyone help please?

Usual TIA


__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Richard Buttrey
 
Posts: n/a
Default Help with Indirect function ?

On Wed, 24 May 2006 22:56:41 +0100, "Bob Phillips"
wrote:

Richard,

It would be better to put the whole range (M15:M2033) in T1 and use

=SUMIF(mqs_col,$N14,INDIRECT("'Main Working Paper'!"&T1))

or if you want a variable last row somehow, then at least the letter (M15:M)
and use

=SUMIF(mqs_col,$N14,INDIRECT("'Main Working Paper'!"&T1&"2033"))

just makes it easier to read and maintain.


Thanks Bob - (and Biff)

I see now my main mistake was to have the Indirect before the SumIf...
doh!

Good idea though about having the whole reference in T1.

Incidentally I hope to be going to the Excel conference in London in
July so I'll make a point of coming to say Hello.

Rgds

__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Help with Indirect function ?

Please do, it will be good to meet you.

Regards

Bob

"Richard Buttrey" wrote in
message ...
On Wed, 24 May 2006 22:56:41 +0100, "Bob Phillips"
wrote:

Richard,

It would be better to put the whole range (M15:M2033) in T1 and use

=SUMIF(mqs_col,$N14,INDIRECT("'Main Working Paper'!"&T1))

or if you want a variable last row somehow, then at least the letter

(M15:M)
and use

=SUMIF(mqs_col,$N14,INDIRECT("'Main Working Paper'!"&T1&"2033"))

just makes it easier to read and maintain.


Thanks Bob - (and Biff)

I see now my main mistake was to have the Indirect before the SumIf...
doh!

Good idea though about having the whole reference in T1.

Incidentally I hope to be going to the Excel conference in London in
July so I'll make a point of coming to say Hello.

Rgds

__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________





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
Using INDIRECT in INDEX(LINEST.. ) function Incoherent Excel Worksheet Functions 4 January 10th 06 04:42 PM
include INDIRECT function into SUMPRODUCT formula markx Excel Worksheet Functions 1 November 9th 05 05:04 PM
Using Indirect Function Pester Excel Worksheet Functions 1 March 30th 05 01:04 AM
INDIRECT function question Joe Excel Worksheet Functions 1 February 14th 05 03:54 PM
Indirect( ) function loosing values when spreadsheets are closed Word4Dummies Excel Worksheet Functions 2 February 13th 05 12:41 PM


All times are GMT +1. The time now is 08:06 AM.

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"