Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 173
Default SUMIFS with relative reference r1c1

Have to SUMIFS some columns in a Grand Total row, which in the following
example happens to be on row 53, but could end up in any row from 10 to 500.

Have designated FinalRow as whatever the Grand Total row is, -1.

Would like it to calc "sumifs columns b thru v, from row 6 down to FinalRow
[or from FinalRow up to row 6], as long as any row in column a contains the
text "total".

At present it's static, as I can't seem to get the FinalRow worked into it ...

ActiveCell.Range("b1.v1").FormulaR1C1 =
"=SUMIFS(R[-46]C:R[-1]C,R7C1:R52C1,""*total"")"

Any assistance would be sincerely appreciated.
Regards,
- Mike
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default SUMIFS with relative reference r1c1

Maybe...

ActiveCell.Range("b1:v1").FormulaR1C1 =
"=SUMIFS(R6C:R[-1]C,R7C6:R[-1]C1,""*total"")"

Change the 6's to whatever your first row is.

And I changed b1.v1 to b1:v1, too.

MikeF wrote:

Have to SUMIFS some columns in a Grand Total row, which in the following
example happens to be on row 53, but could end up in any row from 10 to 500.

Have designated FinalRow as whatever the Grand Total row is, -1.

Would like it to calc "sumifs columns b thru v, from row 6 down to FinalRow
[or from FinalRow up to row 6], as long as any row in column a contains the
text "total".

At present it's static, as I can't seem to get the FinalRow worked into it ...

ActiveCell.Range("b1.v1").FormulaR1C1 =
"=SUMIFS(R[-46]C:R[-1]C,R7C1:R52C1,""*total"")"

Any assistance would be sincerely appreciated.
Regards,
- Mike


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 173
Default SUMIFS with relative reference r1c1

Yup, that's it.
Thanx Dave.
I ended up figuring it out.
.... Was over-complicating it, and stewed myself into a corner.
Hate it when that happens!

"Dave Peterson" wrote:

Maybe...

ActiveCell.Range("b1:v1").FormulaR1C1 =
"=SUMIFS(R6C:R[-1]C,R7C6:R[-1]C1,""*total"")"

Change the 6's to whatever your first row is.

And I changed b1.v1 to b1:v1, too.

MikeF wrote:

Have to SUMIFS some columns in a Grand Total row, which in the following
example happens to be on row 53, but could end up in any row from 10 to 500.

Have designated FinalRow as whatever the Grand Total row is, -1.

Would like it to calc "sumifs columns b thru v, from row 6 down to FinalRow
[or from FinalRow up to row 6], as long as any row in column a contains the
text "total".

At present it's static, as I can't seem to get the FinalRow worked into it ...

ActiveCell.Range("b1.v1").FormulaR1C1 =
"=SUMIFS(R[-46]C:R[-1]C,R7C1:R52C1,""*total"")"

Any assistance would be sincerely appreciated.
Regards,
- Mike


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default SUMIFS with relative reference r1c1

I screwed it up!

ActiveCell.Range("b1.v1").FormulaR1C1 _
= "=SUMIFS(R6C:R[-1]C,R6C1:R[-1]C1,""*total"")"



Dave Peterson wrote:

Maybe...

ActiveCell.Range("b1:v1").FormulaR1C1 =
"=SUMIFS(R6C:R[-1]C,R7C6:R[-1]C1,""*total"")"

Change the 6's to whatever your first row is.

And I changed b1.v1 to b1:v1, too.

MikeF wrote:

Have to SUMIFS some columns in a Grand Total row, which in the following
example happens to be on row 53, but could end up in any row from 10 to 500.

Have designated FinalRow as whatever the Grand Total row is, -1.

Would like it to calc "sumifs columns b thru v, from row 6 down to FinalRow
[or from FinalRow up to row 6], as long as any row in column a contains the
text "total".

At present it's static, as I can't seem to get the FinalRow worked into it ...

ActiveCell.Range("b1.v1").FormulaR1C1 =
"=SUMIFS(R[-46]C:R[-1]C,R7C1:R52C1,""*total"")"

Any assistance would be sincerely appreciated.
Regards,
- Mike


--

Dave Peterson


--

Dave Peterson
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 Range Reference in a sumifs formula cbotos Excel Worksheet Functions 6 April 1st 10 02:59 AM
R1C1 reference Rick Excel Discussion (Misc queries) 4 March 26th 10 11:24 PM
cell reference in sumifs Jai Excel Worksheet Functions 4 May 29th 08 06:30 AM
R1C1 reference style Peg P Excel Discussion (Misc queries) 2 November 15th 05 06:48 PM
R1C1 reference Tony S Excel Discussion (Misc queries) 1 May 10th 05 05:58 PM


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