Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default Formula for getting data with 2 conditions

Hi,

I have somedata in one excel file (say Data1.xls) and want the summary
(Count) of that data into another excel file (say Result1.xls).

There should be 2 conditions to it. The first one is I have got a date in
Result1.xls (say 1-Jan-08) this date should be checked in Data1.xls and if it
matches then the second condition is Name in Result1.xls (say John). If date
and name is 1-Jan-08 and John respectively then I should get the Count of
name (John) on 1-Jan-08 in Result1.xls.

I tried with Countif function, but I am getting any one of the above
condition and not both.

Hope I am able to convey what I require.

Cheers,
Mandeep Dhami


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,480
Default Formula for getting data with 2 conditions

Hi

Assuming Date is in column A and Name in column B
=SUMPRODUCT(([Data1.xls]Sheet1!$A$2:$A$1000=--"01 Jan
08")*([Data1.xls]Sheet1!$B$2:$B$1000="John"))

Change references and sheet names as appropriate.

Better still would be to put the Date and Name in cells on Result Sheet, say
in A1 Date required and B1 Name required then use
=SUMPRODUCT(([Data1.xls]Sheet1!$A$2:$A$1000=A1)*([Data1.xls]Sheet1!$B$2:$B$1000=B1))

--

Regards
Roger Govier

"Mandeep Dhami" wrote in message
...
Hi,

I have somedata in one excel file (say Data1.xls) and want the summary
(Count) of that data into another excel file (say Result1.xls).

There should be 2 conditions to it. The first one is I have got a date in
Result1.xls (say 1-Jan-08) this date should be checked in Data1.xls and if
it
matches then the second condition is Name in Result1.xls (say John). If
date
and name is 1-Jan-08 and John respectively then I should get the Count of
name (John) on 1-Jan-08 in Result1.xls.

I tried with Countif function, but I am getting any one of the above
condition and not both.

Hope I am able to convey what I require.

Cheers,
Mandeep Dhami


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default Formula for getting data with 2 conditions

Thanks a lot Roger......your solution worked.

"Roger Govier" wrote:

Hi

Assuming Date is in column A and Name in column B
=SUMPRODUCT(([Data1.xls]Sheet1!$A$2:$A$1000=--"01 Jan
08")*([Data1.xls]Sheet1!$B$2:$B$1000="John"))

Change references and sheet names as appropriate.

Better still would be to put the Date and Name in cells on Result Sheet, say
in A1 Date required and B1 Name required then use
=SUMPRODUCT(([Data1.xls]Sheet1!$A$2:$A$1000=A1)*([Data1.xls]Sheet1!$B$2:$B$1000=B1))

--

Regards
Roger Govier

"Mandeep Dhami" wrote in message
...
Hi,

I have somedata in one excel file (say Data1.xls) and want the summary
(Count) of that data into another excel file (say Result1.xls).

There should be 2 conditions to it. The first one is I have got a date in
Result1.xls (say 1-Jan-08) this date should be checked in Data1.xls and if
it
matches then the second condition is Name in Result1.xls (say John). If
date
and name is 1-Jan-08 and John respectively then I should get the Count of
name (John) on 1-Jan-08 in Result1.xls.

I tried with Countif function, but I am getting any one of the above
condition and not both.

Hope I am able to convey what I require.

Cheers,
Mandeep Dhami



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
two conditions formula michelledean via OfficeKB.com Excel Discussion (Misc queries) 2 February 21st 07 06:19 PM
IF formula for 3 possible conditions cbgraphics Excel Discussion (Misc queries) 6 December 28th 06 03:22 PM
Formula With Several Conditions Chris Excel Worksheet Functions 1 November 14th 06 02:38 PM
If formula with 12 conditions tkacoo Excel Discussion (Misc queries) 5 April 7th 05 05:54 PM
Help for a formula using two conditions harwookf Excel Worksheet Functions 7 November 24th 04 09:21 AM


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