Need a code/formula if some conditions meet

Vishaal

Well-known Member
Joined
Mar 16, 2019
Messages
533
Office Version
  1. 2010
  2. 2007
Platform
  1. Windows
  2. Web
HI All,

Thanks in advance,

we have the following data

TimenameOption
5-3-2020 16:28:28name1Soap
5-3-2020 16:30:07name1Soap
5-3-2020 16:39:12name1Soap
5-4-2020 5:31:19name4Juice
5-5-2020 5:44:38name2Soap
5-5-2020 5:44:57name2Juice
5-5-2020 5:45:35name2suggesion
5-5-2020 5:46:39name2Mango
5-5-2020 5:47:34name2idea


want some result from the above sheet to below sheet

Sales Reporting Sheet.xlsx
ABCD
1NameData
2AmountSoapJuice
3name1#VALUE!
4name20
5name30
6name40
Sheet3
Cell Formulas
RangeFormula
C3C3=COUNTIFS(Sales!B$2:B43,A3,Sales!C$2:C1109,C2)
C4:C6C4=COUNTIFS(Sales!B3:B1110,A4,Sales!C3:C1110,C3)


i want how many times the said condition matched and result will show in sheet3!c4 - condition one, if sheet3!a4 match Sales!B2:B and condition two is sheet3!c3 match Sales!C2:C

i have tried a formula in sheet3!c4 but its not working

help pls
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
How about

The size in the ranges must be the same :

$B$2:$B$43 and $C$2:$C$43

varios 09jun2020.xlsm
ABCD
1NameData
2AmountSoapJuice
3name130
4name211
5name300
6name401
Sheet3
Cell Formulas
RangeFormula
C3:D6C3=COUNTIFS(Sales!$B$2:$B$43,$A3,Sales!$C$2:$C$43,C$2)
 
Upvote 0
thans DanteAmor ji,

can we use complete column, i mean in your formula can we select range Sales!B2:B and Sales!C2:C
 
Upvote 0
Of course

=CONTAR.SI.CONJUNTO(Sales!$B:$B,$A3,Sales!$C:$C,C$2)
 
Upvote 0
Sorry, I forgot to translate.

Use this please:

=COUNTIFS(Sales!$B:$B,$A3,Sales!$C:$C,C$2)
 
Upvote 0
its perfect working,

Many thanks to your and your formula

may i know why in #2 formula is giving the wrong result i mean with the current formula we are getting the value 9, its right
and from previous formula we are getting 8
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,198
Members
449,072
Latest member
DW Draft

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