Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Laddy
 
Posts: n/a
Default SUMIF with 2 criterias

Hello,
I am trying to work out how to extract data with 2 criteria using SUMIF and
IF but cannot manage it.

In the worksheet which holds the results:
Column A has dates
Column B where the results of the formula will be placed

I wish to extract data from another worksheet but with an extra criterion
and that is "Warehouse".
This data is taken from "sheet2"
Column B (Where "Warehouse" is one of many different values)
Column C (Where the dates are situated)
Column D (Where the cash is situated)

I tried :

=IF(Sheet2!B:B="Warehouse",SUMIF(Sheet2!C:C,'2005 Takings'!A1,Sheet2!D:D))

It doesn't work (Returns FALSE)..................... any ideas please

Laddy


  #2   Report Post  
Roni
 
Posts: n/a
Default

Laddy,

Try to use sumif with array function:
=sum(if((sheet2!C1:C100=B1)*(sheet2!B1:B100="wareh ouse"),sheet2!D1:D100)

Note: end the formula with Ctrl + Shift + Enter

Roni

  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

=SUMPRODUCT(--(Sheet2!B:B="Warehouse"),--(Sheet2!C:C='2005
Takings'!A1),Sheet2!D:D)


--
HTH

Bob Phillips

"Laddy" wrote in message
...
Hello,
I am trying to work out how to extract data with 2 criteria using SUMIF

and
IF but cannot manage it.

In the worksheet which holds the results:
Column A has dates
Column B where the results of the formula will be placed

I wish to extract data from another worksheet but with an extra criterion
and that is "Warehouse".
This data is taken from "sheet2"
Column B (Where "Warehouse" is one of many different values)
Column C (Where the dates are situated)
Column D (Where the cash is situated)

I tried :

=IF(Sheet2!B:B="Warehouse",SUMIF(Sheet2!C:C,'2005 Takings'!A1,Sheet2!D:D))

It doesn't work (Returns FALSE)..................... any ideas please

Laddy




  #4   Report Post  
Max
 
Posts: n/a
Default

"Bob Phillips" wrote
=SUMPRODUCT(--(Sheet2!B:B="Warehouse"),--(Sheet2!C:C='2005
Takings'!A1),Sheet2!D:D)


Think Bob probably meant something like:
=SUMPRODUCT(--(Sheet2!B1:B100="Warehouse"),--(Sheet2!C1:C100='2005
Takings'!A1),Sheet2!D1:D100)

Adapt the ranges to suit ..
(Note: you can't use entire col refs in SUMPRODUCT)
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----


  #5   Report Post  
Laddy
 
Posts: n/a
Default

Thanks lads I shall now have a bash at doing the job
Good luck to you all

Laddy

"Laddy" wrote in message
...
Hello,
I am trying to work out how to extract data with 2 criteria using SUMIF
and IF but cannot manage it.

In the worksheet which holds the results:
Column A has dates
Column B where the results of the formula will be placed

I wish to extract data from another worksheet but with an extra criterion
and that is "Warehouse".
This data is taken from "sheet2"
Column B (Where "Warehouse" is one of many different values)
Column C (Where the dates are situated)
Column D (Where the cash is situated)

I tried :

=IF(Sheet2!B:B="Warehouse",SUMIF(Sheet2!C:C,'2005 Takings'!A1,Sheet2!D:D))

It doesn't work (Returns FALSE)..................... any ideas please

Laddy





  #6   Report Post  
Bob Phillips
 
Posts: n/a
Default

That will teach me to just edit the OPs input rather than re-type :-)


"Max" wrote in message
...
"Bob Phillips" wrote
=SUMPRODUCT(--(Sheet2!B:B="Warehouse"),--(Sheet2!C:C='2005
Takings'!A1),Sheet2!D:D)


Think Bob probably meant something like:
=SUMPRODUCT(--(Sheet2!B1:B100="Warehouse"),--(Sheet2!C1:C100='2005
Takings'!A1),Sheet2!D1:D100)

Adapt the ranges to suit ..
(Note: you can't use entire col refs in SUMPRODUCT)
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----




  #7   Report Post  
Max
 
Posts: n/a
Default

You're welcome !
Thanks for posting back ..
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Laddy" wrote in message
...
Thanks lads I shall now have a bash at doing the job
Good luck to you all

Laddy



  #8   Report Post  
Max
 
Posts: n/a
Default

That will teach me to just edit the OPs input rather than re-type :-)
... I got "numb" when I tried your earlier response <bg
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----


  #9   Report Post  
Laddy
 
Posts: n/a
Default

Just to say that the suggested solution work well and I have adapted it to
suit my needs after understanding how it works.
This form of SUMPRODUCT is not in my Excel 97 guide so I must presume it
will be in a later publication. I shall now try to find out.

Thanks

Laddy

"Max" wrote in message
...
You're welcome !
Thanks for posting back ..
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Laddy" wrote in message
...
Thanks lads I shall now have a bash at doing the job
Good luck to you all

Laddy





  #10   Report Post  
Max
 
Posts: n/a
Default

"Laddy" wrote in message
...
Just to say that the suggested solution work well and I have adapted it to
suit my needs after understanding how it works.
This form of SUMPRODUCT is not in my Excel 97 guide so I must presume it
will be in a later publication. I shall now try to find out.


Good to hear that !

Suggest you try Bob Phillips' page for a nice, comprehensive treatment
on SUMPRODUCT:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----




  #11   Report Post  
Bob Phillips
 
Posts: n/a
Default

Look in vain, you won't find it, it is an evolution driven by experienced
Excel users.

Bob

"Laddy" wrote in message
...
Just to say that the suggested solution work well and I have adapted it to
suit my needs after understanding how it works.
This form of SUMPRODUCT is not in my Excel 97 guide so I must presume it
will be in a later publication. I shall now try to find out.

Thanks

Laddy

"Max" wrote in message
...
You're welcome !
Thanks for posting back ..
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Laddy" wrote in message
...
Thanks lads I shall now have a bash at doing the job
Good luck to you all

Laddy







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
How to use SUMIF to return sums between two values located in cells ScottBerger Excel Worksheet Functions 2 April 23rd 23 09:05 PM
SUMIF Not vanjohnson Excel Discussion (Misc queries) 1 March 4th 05 08:42 PM
Sumif or Sumproduct 2 criterias not working SMac Excel Discussion (Misc queries) 5 February 28th 05 07:55 PM
SUMIF - Range name to used for the "sum_range" portion of a SUMIF function Oscar Excel Worksheet Functions 2 January 11th 05 11:01 PM
SUM(IF( Array to avoid #NUM! values Elijah Excel Worksheet Functions 7 November 21st 04 02:17 PM


All times are GMT +1. The time now is 12:43 PM.

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"