Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 57
Default Help with changing column reference in formula

I have a long complex IF formula in which the following SUMPRODUCT formula is
contained.

SUMPRODUCT(--(AE11:AE200))

Depending on the value of cell A1, I would like to dynamically change the
column reference in the formula. For example:

IF A1 = 1, THEN use the column reference AE in the formula
IF A1 = 2, THEN use the column reference AF in the formula

Is there a way to accomplish this by INDIRECT or another formula? Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,069
Default Help with changing column reference in formula

Try

=SUMPRODUCT(--(OFFSET(AE9:AE18,0,A1-1)0))

Hope this helps,

Hutch

"GoBucks" wrote:

I have a long complex IF formula in which the following SUMPRODUCT formula is
contained.

SUMPRODUCT(--(AE11:AE200))

Depending on the value of cell A1, I would like to dynamically change the
column reference in the formula. For example:

IF A1 = 1, THEN use the column reference AE in the formula
IF A1 = 2, THEN use the column reference AF in the formula

Is there a way to accomplish this by INDIRECT or another formula? Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,069
Default Help with changing column reference in formula

Oops! Of course, I meant

=SUMPRODUCT(--(OFFSET(AE11:AE20,0,A1-1)0))

Hutch

"Tom Hutchins" wrote:

Try

=SUMPRODUCT(--(OFFSET(AE9:AE18,0,A1-1)0))

Hope this helps,

Hutch

"GoBucks" wrote:

I have a long complex IF formula in which the following SUMPRODUCT formula is
contained.

SUMPRODUCT(--(AE11:AE200))

Depending on the value of cell A1, I would like to dynamically change the
column reference in the formula. For example:

IF A1 = 1, THEN use the column reference AE in the formula
IF A1 = 2, THEN use the column reference AF in the formula

Is there a way to accomplish this by INDIRECT or another formula? Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 57
Default Help with changing column reference in formula

Thank you Tom!!!

"Tom Hutchins" wrote:

Oops! Of course, I meant

=SUMPRODUCT(--(OFFSET(AE11:AE20,0,A1-1)0))

Hutch

"Tom Hutchins" wrote:

Try

=SUMPRODUCT(--(OFFSET(AE9:AE18,0,A1-1)0))

Hope this helps,

Hutch

"GoBucks" wrote:

I have a long complex IF formula in which the following SUMPRODUCT formula is
contained.

SUMPRODUCT(--(AE11:AE200))

Depending on the value of cell A1, I would like to dynamically change the
column reference in the formula. For example:

IF A1 = 1, THEN use the column reference AE in the formula
IF A1 = 2, THEN use the column reference AF in the formula

Is there a way to accomplish this by INDIRECT or another formula? Thanks!

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Help with changing column reference in formula

Try this...

=COUNTIF(INDEX(AE11:AF20,,A1),"0")

--
Biff
Microsoft Excel MVP


"GoBucks" wrote in message
...
I have a long complex IF formula in which the following SUMPRODUCT formula
is
contained.

SUMPRODUCT(--(AE11:AE200))

Depending on the value of cell A1, I would like to dynamically change the
column reference in the formula. For example:

IF A1 = 1, THEN use the column reference AE in the formula
IF A1 = 2, THEN use the column reference AF in the formula

Is there a way to accomplish this by INDIRECT or another formula? Thanks!



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
Changing Column Reference in Macros? JDM Excel Discussion (Misc queries) 2 October 28th 09 05:17 PM
Excel - changing column reference based on value of other column Dharmesh Patel Excel Discussion (Misc queries) 4 October 12th 09 02:41 PM
MS Excel - changing reference column value based on another column Dharmesh Patel[_2_] Excel Discussion (Misc queries) 2 October 12th 09 01:19 PM
Excel - changing column reference based on value of other column Dharmesh Patel Excel Discussion (Misc queries) 2 October 12th 09 01:18 PM
Stop cell reference in formula changing when insert column? Bobbie Weeks (Ms) Excel Discussion (Misc queries) 1 May 30th 08 06:20 AM


All times are GMT +1. The time now is 07:23 PM.

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"