Matching Multiple Conditions from another Sheet within the same workbook

brodhav

New Member
Joined
Nov 6, 2022
Messages
2
Office Version
  1. 2013
Platform
  1. Windows
Hello everyone, I want to run 4 different conditions on the data present in the source sheet and if all those conditions are met only then I want the function to return 1 in the B2 cell in "Main Sheet". (I've attached the screenshot as well as the sample workbook)

MAIN SHEET:

Sample Sheet.xlsx
ABCDEF
1Inventory
2WLNTOTAL
3JANUARY11
4FEBRUARY0
5MARCH0
6APRIL0
7MAY0
8JUNE0
9JULY0
10AUGUST0
11SEPTMEBER0
12OCTOBER0
13NOVEMBER0
14DECEMBER0
Main Sheet
Cell Formulas
RangeFormula
B3B3=IF(AND('Source Sheet'!A2:A12="JANUARY",'Source Sheet'!C2:C12="T1",'Source Sheet'!D2:D12="Inventory",'Source Sheet'!E2:E12="W"),1,0)
E3:E14E3=SUM(B3:D3)


SOURCE SHEET:

Sample Sheet.xlsx
ABCDEF
1MonthDateTypeSessionResult
2JANUARY01/01/2022T1InventoryW
3JANUARY02/01/2022T1InventoryW
4
5
6
7
8
9
10
11
12
13
14
15
Source Sheet



But as you can see, it only returns one 1 whereas it should have returned 2 since I want this value to keep adding with every record in "Source Sheet" that meets the said criteria.
Can anyone help regarding this as to what I'm doing wrong here?
 

Attachments

  • Main Sheet.png
    Main Sheet.png
    43.4 KB · Views: 23
  • Source Sheet.png
    Source Sheet.png
    13.9 KB · Views: 16

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Hi & welcome to MrExcel.
How about
Excel Formula:
=COUNTIFS('Source Sheet'!A2:A12,"JANUARY",'Source Sheet'!C2:C12,"T1",'Source Sheet'!D2:D12,"Inventory",'Source Sheet'!E2:E12,"W")
 
Upvote 0
Solution
Hi & welcome to MrExcel.
How about
Excel Formula:
=COUNTIFS('Source Sheet'!A2:A12,"JANUARY",'Source Sheet'!C2:C12,"T1",'Source Sheet'!D2:D12,"Inventory",'Source Sheet'!E2:E12,"W")
Hey there,

Now I see where I messed up. Your formula worked like a charm. Thanks a ton, man! Appreciate it
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,180
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top