#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 102
Default Array Help?

I must have a brain cramp because I can't get the formula below to work. In
Column A I have items to buy, in Column B I have dollar amounts associated
with each item, and in column D I have placed an "x" next to items as I
purchase them. The formula below is in cell F2, and is designed to add all
purchases, when an "x" is placed in column D. If there is a purchase amount
in column B, without an "x" in Column D, than the formula shouldn't add the
purchase amounts. What I have below (when entered as an array isn't working).
Any help would be appreciated.

Thanks, Dan

=SUM(B2:B20)*(D2:D20="x")
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 527
Default Array Help?

Dan

How about SumProduct?

=SUMPRODUCT(--(D2:D20="x")*(B2:B20))

not enered as array

If this helps, please click Yes


Peter

"Danny Boy" wrote:

I must have a brain cramp because I can't get the formula below to work. In
Column A I have items to buy, in Column B I have dollar amounts associated
with each item, and in column D I have placed an "x" next to items as I
purchase them. The formula below is in cell F2, and is designed to add all
purchases, when an "x" is placed in column D. If there is a purchase amount
in column B, without an "x" in Column D, than the formula shouldn't add the
purchase amounts. What I have below (when entered as an array isn't working).
Any help would be appreciated.

Thanks, Dan

=SUM(B2:B20)*(D2:D20="x")

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Array Help?

when entered as an array isn't working
=SUM(B2:B20)*(D2:D20="x")


Just a misplaced closing parenthesis.

Array entered.

=SUM(B2:B20*(D2:D20="x"))

You can do the same thing with this normally entered formula:

=SUMIF(D2:D20,"x",B2:B20)

--
Biff
Microsoft Excel MVP


"Danny Boy" wrote in message
...
I must have a brain cramp because I can't get the formula below to work. In
Column A I have items to buy, in Column B I have dollar amounts associated
with each item, and in column D I have placed an "x" next to items as I
purchase them. The formula below is in cell F2, and is designed to add all
purchases, when an "x" is placed in column D. If there is a purchase
amount
in column B, without an "x" in Column D, than the formula shouldn't add
the
purchase amounts. What I have below (when entered as an array isn't
working).
Any help would be appreciated.

Thanks, Dan

=SUM(B2:B20)*(D2:D20="x")



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Array Help?

Try SUMIF()
=SUMIF(D2:D20,"x",B2:B20)


Or try this array formula (your formula modified)
=SUM(--(B2:B20)*(D2:D20="x"))


If this post helps click Yes
---------------
Jacob Skaria


"Danny Boy" wrote:

I must have a brain cramp because I can't get the formula below to work. In
Column A I have items to buy, in Column B I have dollar amounts associated
with each item, and in column D I have placed an "x" next to items as I
purchase them. The formula below is in cell F2, and is designed to add all
purchases, when an "x" is placed in column D. If there is a purchase amount
in column B, without an "x" in Column D, than the formula shouldn't add the
purchase amounts. What I have below (when entered as an array isn't working).
Any help would be appreciated.

Thanks, Dan

=SUM(B2:B20)*(D2:D20="x")

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Array Help?

Or array formula =SUM((B2:B20)*(D2:D20="x")) as I don't think you need the
double unary minus.
--
David Biddulph

Jacob Skaria wrote:
Try SUMIF()
=SUMIF(D2:D20,"x",B2:B20)

Or try this array formula (your formula modified)
=SUM(--(B2:B20)*(D2:D20="x"))

If this post helps click Yes
---------------
Jacob Skaria


"Danny Boy" wrote:

I must have a brain cramp because I can't get the formula below to
work. In Column A I have items to buy, in Column B I have dollar
amounts associated with each item, and in column D I have placed an
"x" next to items as I purchase them. The formula below is in cell
F2, and is designed to add all purchases, when an "x" is placed in
column D. If there is a purchase amount in column B, without an "x"
in Column D, than the formula shouldn't add the purchase amounts.
What I have below (when entered as an array isn't working). Any help
would be appreciated.

Thanks, Dan

=SUM(B2:B20)*(D2:D20="x")





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 915
Default Array Help?

Danny Boy wrote:
I must have a brain cramp because I can't get the formula below to work. In
Column A I have items to buy, in Column B I have dollar amounts associated
with each item, and in column D I have placed an "x" next to items as I
purchase them. The formula below is in cell F2, and is designed to add all
purchases, when an "x" is placed in column D. If there is a purchase amount
in column B, without an "x" in Column D, than the formula shouldn't add the
purchase amounts. What I have below (when entered as an array isn't working).
Any help would be appreciated.

Thanks, Dan

=SUM(B2:B20)*(D2:D20="x")


Maybe you meant this non-array formula:

=SUMPRODUCT((B2:B20)*(D2:D20="x"))
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 102
Default Array Help?

Thanks Everyone.....Your suggestions worked!

"smartin" wrote:

Danny Boy wrote:
I must have a brain cramp because I can't get the formula below to work. In
Column A I have items to buy, in Column B I have dollar amounts associated
with each item, and in column D I have placed an "x" next to items as I
purchase them. The formula below is in cell F2, and is designed to add all
purchases, when an "x" is placed in column D. If there is a purchase amount
in column B, without an "x" in Column D, than the formula shouldn't add the
purchase amounts. What I have below (when entered as an array isn't working).
Any help would be appreciated.

Thanks, Dan

=SUM(B2:B20)*(D2:D20="x")


Maybe you meant this non-array formula:

=SUMPRODUCT((B2:B20)*(D2:D20="x"))

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
Array formula: how to join 2 ranges together to form one array? Rich_84 Excel Worksheet Functions 2 April 1st 09 06:38 PM
Find specific value in array of array formula DzednConfsd Excel Worksheet Functions 2 January 13th 09 06:19 AM
Prevent cell/array references from changing when altering/moving thecell/array nme Excel Discussion (Misc queries) 1 September 19th 08 01:53 PM
meaning of : IF(Switch; Average(array A, array B); array A) DXAT Excel Worksheet Functions 1 October 24th 06 06:11 PM
combining cells and array from different sheets into an array to pass to IRR() [email protected] Excel Discussion (Misc queries) 3 September 11th 06 07:17 AM


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