#1   Report Post  
Posted to microsoft.public.excel.misc
Ctrl-Alt-Del
 
Posts: n/a
Default nested formulas

I am trying to get a previously built worksheet to properly run some
formulas. We have three product types, designated "C", "P", and "M". The
worksheet has a column with one of these designations entered in each cell,
with the weight associated with each entry in an adjoining cell in the next
column. The formula calls for the worksheet to sum the weights by product
type, using a nested SUM(IF) command
=SUM(IF($D$2:$D$400="C",$E$2:$E$400)), and likewise for the other two types.

The problem is that this formula works great when surrounded by brackets {
}, but not otherwise. Attempts to manually enter or otherwise force the
brackets prove fruitless, as including the = sign hides the indication that
this is a formula. Re-entering the formula in a clean cell also does no good.

What am I doing wrong, and how do I fix it? Many thanks.
--
Ctrl-Alt-Del signing off
  #2   Report Post  
Posted to microsoft.public.excel.misc
JE McGimpsey
 
Posts: n/a
Default nested formulas

The brackets are automatically added by XL when you array-enter the
formula (by holding down the CTRL and SHIFT key when you hit Enter). See
Help for more info.

You could avoid array-entering by using SUMIF()

=SUMIF(D2:D400,"C",E2:E400)




In article ,
Ctrl-Alt-Del wrote:

I am trying to get a previously built worksheet to properly run some
formulas. We have three product types, designated "C", "P", and "M". The
worksheet has a column with one of these designations entered in each cell,
with the weight associated with each entry in an adjoining cell in the next
column. The formula calls for the worksheet to sum the weights by product
type, using a nested SUM(IF) command
=SUM(IF($D$2:$D$400="C",$E$2:$E$400)), and likewise for the other two types.

The problem is that this formula works great when surrounded by brackets {
}, but not otherwise. Attempts to manually enter or otherwise force the
brackets prove fruitless, as including the = sign hides the indication that
this is a formula. Re-entering the formula in a clean cell also does no good.

What am I doing wrong, and how do I fix it? Many thanks.

  #3   Report Post  
Posted to microsoft.public.excel.misc
bpeltzer
 
Posts: n/a
Default nested formulas

{} signify an array formula, which must be committed with ctrl+shift+enter
(not just the plain old enter).
In this case, however, you can just use the sumif function to do what you
want:
=sumif($d$2:$d$4000,"C",$e$2:$e$4000).

"Ctrl-Alt-Del" wrote:

I am trying to get a previously built worksheet to properly run some
formulas. We have three product types, designated "C", "P", and "M". The
worksheet has a column with one of these designations entered in each cell,
with the weight associated with each entry in an adjoining cell in the next
column. The formula calls for the worksheet to sum the weights by product
type, using a nested SUM(IF) command
=SUM(IF($D$2:$D$400="C",$E$2:$E$400)), and likewise for the other two types.

The problem is that this formula works great when surrounded by brackets {
}, but not otherwise. Attempts to manually enter or otherwise force the
brackets prove fruitless, as including the = sign hides the indication that
this is a formula. Re-entering the formula in a clean cell also does no good.

What am I doing wrong, and how do I fix it? Many thanks.
--
Ctrl-Alt-Del signing off

  #4   Report Post  
Posted to microsoft.public.excel.misc
Ctrl-Alt-Del
 
Posts: n/a
Default nested formulas

Thank you both. I work on the backside of the network and don't see the front
end much, anymore. Your solution worked like a charm.
--
Ctrl-Alt-Del signing off


"bpeltzer" wrote:

{} signify an array formula, which must be committed with ctrl+shift+enter
(not just the plain old enter).
In this case, however, you can just use the sumif function to do what you
want:
=sumif($d$2:$d$4000,"C",$e$2:$e$4000).

"Ctrl-Alt-Del" wrote:

I am trying to get a previously built worksheet to properly run some
formulas. We have three product types, designated "C", "P", and "M". The
worksheet has a column with one of these designations entered in each cell,
with the weight associated with each entry in an adjoining cell in the next
column. The formula calls for the worksheet to sum the weights by product
type, using a nested SUM(IF) command
=SUM(IF($D$2:$D$400="C",$E$2:$E$400)), and likewise for the other two types.

The problem is that this formula works great when surrounded by brackets {
}, but not otherwise. Attempts to manually enter or otherwise force the
brackets prove fruitless, as including the = sign hides the indication that
this is a formula. Re-entering the formula in a clean cell also does no good.

What am I doing wrong, and how do I fix it? Many thanks.
--
Ctrl-Alt-Del signing off

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
Countif formulas change after doing a sort Bob Smith Excel Worksheet Functions 3 January 3rd 06 11:17 PM
How do I use wild cards in nested array formulas? hopeit Excel Worksheet Functions 7 August 16th 05 02:18 AM
Array Formulas take waaaay too long... belly0fdesire Excel Worksheet Functions 7 August 8th 05 10:11 PM
nested formulas dutchtreet Excel Worksheet Functions 5 February 3rd 05 08:25 PM
calculating formulas for all workbooks in a folder Chad Excel Worksheet Functions 3 November 13th 04 05:22 PM


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