Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
boooney
 
Posts: n/a
Default Help with a complicated array formula

Hi--

I'm trying to sum an array that meets certain conditions into a single
cell

A B C
1
2
3

I need the function to sum column C for instances whe
(column A = 1 or 2 or 3) and
(column B 4 and <5)

1-3 are numbers and 4,5 are dates

Can anyone help with the syntax I should use? I've found array formula
samples of AND and OR, but not both together. Everything I've tried so
far has failed to produce the result I need.

Thanks in advance.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
mikebres
 
Posts: n/a
Default Help with a complicated array formula

Try this
{=SUM(IF(((dataA=1)+(dataA=2)+(dataA=3))*((dataB4 )*(dataB<5)),dataC))}

Make sure you press Control Shift Enter to make this an array formula. Just
to simplfy the formula I named the ranges where dataA is the data in column
A, dataB is the data in column B, etc. To explain a little, the plus works
as an OR and the multilpication acts as an AND.

Mike

"boooney" wrote:

Hi--

I'm trying to sum an array that meets certain conditions into a single
cell

A B C
1
2
3

I need the function to sum column C for instances whe
(column A = 1 or 2 or 3) and
(column B 4 and <5)

1-3 are numbers and 4,5 are dates

Can anyone help with the syntax I should use? I've found array formula
samples of AND and OR, but not both together. Everything I've tried so
far has failed to produce the result I need.

Thanks in advance.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Help with a complicated array formula

Hi!

This is very confusing (at least it is to me):

(column B 4 and <5)


1-3 are numbers and 4,5 are dates


If 4 and 5 are dates like 12/4/2005, 12/5/2005, then there is no date that
is 4 AND <5.

Or am I just having one of those days?

Biff

"boooney" wrote in message
oups.com...
Hi--

I'm trying to sum an array that meets certain conditions into a single
cell

A B C
1
2
3

I need the function to sum column C for instances whe
(column A = 1 or 2 or 3) and
(column B 4 and <5)

1-3 are numbers and 4,5 are dates

Can anyone help with the syntax I should use? I've found array formula
samples of AND and OR, but not both together. Everything I've tried so
far has failed to produce the result I need.

Thanks in advance.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Domenic
 
Posts: n/a
Default Help with a complicated array formula

Try...

=SUMPRODUCT(--(ISNUMBER(MATCH(A1:A10,{1,2,3},0))),--(B1:B10D1),--(B1:B10
<E1),C1:C10)

....where D1 contains your start date, and E1 contains your end date.

Hope this helps!

In article .com,
"boooney" wrote:

Hi--

I'm trying to sum an array that meets certain conditions into a single
cell

A B C
1
2
3

I need the function to sum column C for instances whe
(column A = 1 or 2 or 3) and
(column B 4 and <5)

1-3 are numbers and 4,5 are dates

Can anyone help with the syntax I should use? I've found array formula
samples of AND and OR, but not both together. Everything I've tried so
far has failed to produce the result I need.

Thanks in advance.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
mikebres
 
Posts: n/a
Default Help with a complicated array formula

If I understood him correctly then:
A B C
1 3.6 1
2 4.6 3
3 4.2 5
4 12/13/2005 ?
5 11/12/2005 ?

"Biff" wrote:

Hi!

This is very confusing (at least it is to me):

(column B 4 and <5)


1-3 are numbers and 4,5 are dates


If 4 and 5 are dates like 12/4/2005, 12/5/2005, then there is no date that
is 4 AND <5.

Or am I just having one of those days?

Biff

"boooney" wrote in message
oups.com...
Hi--

I'm trying to sum an array that meets certain conditions into a single
cell

A B C
1
2
3

I need the function to sum column C for instances whe
(column A = 1 or 2 or 3) and
(column B 4 and <5)

1-3 are numbers and 4,5 are dates

Can anyone help with the syntax I should use? I've found array formula
samples of AND and OR, but not both together. Everything I've tried so
far has failed to produce the result I need.

Thanks in advance.






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
SteveG
 
Posts: n/a
Default Help with a complicated array formula


This seemed to work changing the original suggestion posted slightly.

{=SUM(IF((A1:A4={1,2,3})*((B1:B4DATE(2005,12,1))* (B1:B4<DATE(2005,12,31))),C1:C4))}

The DATE is your start and end dates.


Cheers,

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=492284

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
boooney
 
Posts: n/a
Default Help with a complicated array formula

Thanks Guys. I will try each of these out and let you know.

Dan

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
boooney
 
Posts: n/a
Default Help with a complicated array formula

At least a couple of these worked beautifully!! Thanks for your help.

Dan

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
2nd attempt ~ complicated formula Luke Excel Worksheet Functions 3 November 9th 05 03:33 AM
Editing Array Formula [email protected] Excel Worksheet Functions 7 August 28th 05 06:46 AM
complicated array boris Excel Worksheet Functions 5 March 1st 05 10:15 AM
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 04:37 PM
What instead of an array formula part 2 Reg Besseling Excel Discussion (Misc queries) 2 December 10th 04 07:35 AM


All times are GMT +1. The time now is 05:54 PM.

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"