#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Bob is offline
external usenet poster
 
Posts: 972
Default IF OR AND

If $J2:$J20000 = "to" and $L2:$L20000 or $N2:$N20000 = $B2, then I want to
SUM $AV2:$AV20000

Can anyone kindly help me with an array formula for this? Thank you.

Bob
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default IF OR AND

Try this. Normally entered:

=SUMPRODUCT(--($J2:$J20000="to"),--(($L2:$L20000=$B2)+($N2:$N20000=$B2)0),$AV2:$AV20 000)


--
Biff
Microsoft Excel MVP


"bob" wrote in message
...
If $J2:$J20000 = "to" and $L2:$L20000 or $N2:$N20000 = $B2, then I want
to
SUM $AV2:$AV20000

Can anyone kindly help me with an array formula for this? Thank you.

Bob



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default IF OR AND

Something like this, normal ENTER:
=SUMPRODUCT((J2:J10="to")*((L2:L10=B2)+(N2:N10=B2) ),AV2:AV10)
Adapt the ranges to suit
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:20,500 Files:363 Subscribers:64
xdemechanik
---
"bob" wrote:
If $J2:$J20000 = "to" and $L2:$L20000 or $N2:$N20000 = $B2, then I want to
SUM $AV2:$AV20000

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default IF OR AND

Hi Max,

I believe your solution will double-count entries if say column J2 = to and
column N2 = B2.

Cheers,
Shane Devenshire

"Max" wrote:

Something like this, normal ENTER:
=SUMPRODUCT((J2:J10="to")*((L2:L10=B2)+(N2:N10=B2) ),AV2:AV10)
Adapt the ranges to suit
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:20,500 Files:363 Subscribers:64
xdemechanik
---
"bob" wrote:
If $J2:$J20000 = "to" and $L2:$L20000 or $N2:$N20000 = $B2, then I want to
SUM $AV2:$AV20000

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default IF OR AND

I believe your solution will double-count entries
if say column J2 = to and column N2 = B2.


Correct, Shane. Thanks.

It should have been:
=SUMPRODUCT((J2:J10="to")*((L2:L10=B2)+(N2:N10=B2) 0),AV2:AV10)
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:20,500 Files:363 Subscribers:64
xdemechanik
---

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



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