Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 112
Default SUMIF on a collection of individual cells

Excel 2000 R1C1 reference notation

What is the syntax for the SUMIF function if the range to be summed is
a collection of indivicual cells - separated by commas? The following
function fails:

=SUMIF(RC[-1],RC[-2],RC[-3],RC[-9],"<#NAME?")

If the range were RC[-1]:RC[-9] it would work fine.

=SUM(RC[-1],RC[-2],RC[-3],RC[-9])

Works fine. I'm trying to add the IF <#NAME? to it.

Thanks,

Fred Holmes
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 112
Default SUMIF on a collection of individual cells

Well,

=SUMIF(RC[-1],"<#NAME?")+SUMIF(RC[-2],"<#NAME?")+SUMIF(RC[-3],"<#NAME?")+SUMIF(RC[-9],"<#NAME?")

seems to work, but it's a terrible kludge. Surely there is a more
"elegant" formula?

Fred Holmes


On Wed, 17 Jun 2009 17:30:22 -0400, Fred Holmes wrote:

Excel 2000 R1C1 reference notation

What is the syntax for the SUMIF function if the range to be summed is
a collection of indivicual cells - separated by commas? The following
function fails:

=SUMIF(RC[-1],RC[-2],RC[-3],RC[-9],"<#NAME?")

If the range were RC[-1]:RC[-9] it would work fine.

=SUM(RC[-1],RC[-2],RC[-3],RC[-9])

Works fine. I'm trying to add the IF <#NAME? to it.

Thanks,

Fred Holmes


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default SUMIF on a collection of individual cells

You could use two =sumif()'s. RC[-3]:RC[-1] is a single area.



Fred Holmes wrote:

Well,

=SUMIF(RC[-1],"<#NAME?")+SUMIF(RC[-2],"<#NAME?")+SUMIF(RC[-3],"<#NAME?")+SUMIF(RC[-9],"<#NAME?")

seems to work, but it's a terrible kludge. Surely there is a more
"elegant" formula?

Fred Holmes

On Wed, 17 Jun 2009 17:30:22 -0400, Fred Holmes wrote:

Excel 2000 R1C1 reference notation

What is the syntax for the SUMIF function if the range to be summed is
a collection of indivicual cells - separated by commas? The following
function fails:

=SUMIF(RC[-1],RC[-2],RC[-3],RC[-9],"<#NAME?")

If the range were RC[-1]:RC[-9] it would work fine.

=SUM(RC[-1],RC[-2],RC[-3],RC[-9])

Works fine. I'm trying to add the IF <#NAME? to it.

Thanks,

Fred Holmes


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default SUMIF on a collection of individual cells

Try this:

=SUM(SUMIF(INDIRECT({"RC[-1]","RC[-2]","RC[-3]","RC[-9]"},0),"<#NAME?"))

--
Biff
Microsoft Excel MVP


"Fred Holmes" wrote in message
...
Excel 2000 R1C1 reference notation

What is the syntax for the SUMIF function if the range to be summed is
a collection of indivicual cells - separated by commas? The following
function fails:

=SUMIF(RC[-1],RC[-2],RC[-3],RC[-9],"<#NAME?")

If the range were RC[-1]:RC[-9] it would work fine.

=SUM(RC[-1],RC[-2],RC[-3],RC[-9])

Works fine. I'm trying to add the IF <#NAME? to it.

Thanks,

Fred Holmes



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 112
Default SUMIF on a collection of individual cells

But, while the provided formula "works," it does not "adjust" if a
column is inserted/deleted in the worksheet. I need a formula that
adapts to column insertions and deletions "in the usual fashion."

The "fixed" reference is a property of the INDIRECT() function.

Fred Holmes


On Wed, 17 Jun 2009 21:54:37 -0400, "T. Valko"
wrote:

Try this:

=SUM(SUMIF(INDIRECT({"RC[-1]","RC[-2]","RC[-3]","RC[-9]"},0),"<#NAME?"))

--
Biff
Microsoft Excel MVP


"Fred Holmes" wrote in message
.. .
Excel 2000 R1C1 reference notation

What is the syntax for the SUMIF function if the range to be summed is
a collection of indivicual cells - separated by commas? The following
function fails:

=SUMIF(RC[-1],RC[-2],RC[-3],RC[-9],"<#NAME?")

If the range were RC[-1]:RC[-9] it would work fine.

=SUM(RC[-1],RC[-2],RC[-3],RC[-9])

Works fine. I'm trying to add the IF <#NAME? to it.

Thanks,

Fred Holmes





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default SUMIF on a collection of individual cells

Then you'll have to use the kludge method:

=SUMIF(...)+SUMIF(...)+etc

--
Biff
Microsoft Excel MVP


"Fred Holmes" wrote in message
...
But, while the provided formula "works," it does not "adjust" if a
column is inserted/deleted in the worksheet. I need a formula that
adapts to column insertions and deletions "in the usual fashion."

The "fixed" reference is a property of the INDIRECT() function.

Fred Holmes


On Wed, 17 Jun 2009 21:54:37 -0400, "T. Valko"
wrote:

Try this:

=SUM(SUMIF(INDIRECT({"RC[-1]","RC[-2]","RC[-3]","RC[-9]"},0),"<#NAME?"))

--
Biff
Microsoft Excel MVP


"Fred Holmes" wrote in message
. ..
Excel 2000 R1C1 reference notation

What is the syntax for the SUMIF function if the range to be summed is
a collection of indivicual cells - separated by commas? The following
function fails:

=SUMIF(RC[-1],RC[-2],RC[-3],RC[-9],"<#NAME?")

If the range were RC[-1]:RC[-9] it would work fine.

=SUM(RC[-1],RC[-2],RC[-3],RC[-9])

Works fine. I'm trying to add the IF <#NAME? to it.

Thanks,

Fred Holmes





  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 272
Default SUMIF on a collection of individual cells

If you can replace the error #name? with text "name?" then your normal
sum formula should work fine.

If not maybe one of these CTRL+SHIFT+ENTERED in xl2007:

=SUM(IFERROR(IF({1;1;1;0},RC[-3]:RC[-1],RC[-9]),""))
=SUM(IFERROR(CHOOSE({1;2;3;4},RC[-3],RC[-2],RC[-1],RC[-9]),""))

For other versions use IF(ISERR(...),"",...) in place of IFERROR(...,"")

"Fred Holmes" wrote:

Excel 2000 R1C1 reference notation

What is the syntax for the SUMIF function if the range to be summed is
a collection of indivicual cells - separated by commas? The following
function fails:

=SUMIF(RC[-1],RC[-2],RC[-3],RC[-9],"<#NAME?")

If the range were RC[-1]:RC[-9] it would work fine.

=SUM(RC[-1],RC[-2],RC[-3],RC[-9])

Works fine. I'm trying to add the IF <#NAME? to it.

Thanks,

Fred Holmes

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default SUMIF on a collection of individual cells

You must have missed the OP's follow-up:

I need a formula that adapts to column insertions and deletions


So anything that uses array constants is out.

--
Biff
Microsoft Excel MVP


"Lori" wrote in message
...
If you can replace the error #name? with text "name?" then your normal
sum formula should work fine.

If not maybe one of these CTRL+SHIFT+ENTERED in xl2007:

=SUM(IFERROR(IF({1;1;1;0},RC[-3]:RC[-1],RC[-9]),""))
=SUM(IFERROR(CHOOSE({1;2;3;4},RC[-3],RC[-2],RC[-1],RC[-9]),""))

For other versions use IF(ISERR(...),"",...) in place of IFERROR(...,"")

"Fred Holmes" wrote:

Excel 2000 R1C1 reference notation

What is the syntax for the SUMIF function if the range to be summed is
a collection of indivicual cells - separated by commas? The following
function fails:

=SUMIF(RC[-1],RC[-2],RC[-3],RC[-9],"<#NAME?")

If the range were RC[-1]:RC[-9] it would work fine.

=SUM(RC[-1],RC[-2],RC[-3],RC[-9])

Works fine. I'm trying to add the IF <#NAME? to it.

Thanks,

Fred Holmes



  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 272
Default SUMIF on a collection of individual cells

The way i see it the second one uses the same references as the sum formula
given in the original post so should work in the same way.

I may well have misinterpreted this however, and sumif+sumif+.. is
the easier method. These just show a different technique.

"T. Valko" wrote:

You must have missed the OP's follow-up:

I need a formula that adapts to column insertions and deletions


So anything that uses array constants is out.

--
Biff
Microsoft Excel MVP


"Lori" wrote in message
...
If you can replace the error #name? with text "name?" then your normal
sum formula should work fine.

If not maybe one of these CTRL+SHIFT+ENTERED in xl2007:

=SUM(IFERROR(IF({1;1;1;0},RC[-3]:RC[-1],RC[-9]),""))
=SUM(IFERROR(CHOOSE({1;2;3;4},RC[-3],RC[-2],RC[-1],RC[-9]),""))

For other versions use IF(ISERR(...),"",...) in place of IFERROR(...,"")

"Fred Holmes" wrote:

Excel 2000 R1C1 reference notation

What is the syntax for the SUMIF function if the range to be summed is
a collection of indivicual cells - separated by commas? The following
function fails:

=SUMIF(RC[-1],RC[-2],RC[-3],RC[-9],"<#NAME?")

If the range were RC[-1]:RC[-9] it would work fine.

=SUM(RC[-1],RC[-2],RC[-3],RC[-9])

Works fine. I'm trying to add the IF <#NAME? to it.

Thanks,

Fred Holmes




  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 112
Default SUMIF on a collection of individual cells

Thanks to everyone for all your suggestions.

Fred Holmes


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
protecting individual cells MedTech Excel Discussion (Misc queries) 1 December 19th 06 07:12 PM
Calculate and display individual error bars for individual points del Charts and Charting in Excel 2 March 31st 06 05:11 PM
Calculate and display individual error bars for individual points del Charts and Charting in Excel 1 March 31st 06 04:24 AM
Is there a way to isolate individual cells? amos79 Excel Worksheet Functions 1 September 27th 05 05:32 PM
Is there a way to protect individual cells? amos79 Excel Discussion (Misc queries) 4 September 27th 05 05:30 PM


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