How to count Specific name for a Specific Date Range

Seifeddine87

Board Regular
Joined
Sep 7, 2015
Messages
128
Office Version
  1. 2016
  2. 2011
  3. 2010
hi i have been trying to do this for few hours and i just give up i know you gays you could do it with your eyes closed :)

1) i want to know how many Specific item has been sold in Specific Date Range
2) i want to know total profit in Specific item has been sold in Specific Date Range

Example

[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Code[/TD]
[TD]Date[/TD]
[TD]Stock No[/TD]
[TD]Profit[/TD]
[TD]Start Date [/TD]
[TD]End Date[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]3119[/TD]
[TD]05/04/19
[/TD]
[TD]40[/TD]
[TD]55[/TD]
[TD]01/04/19[/TD]
[TD]01/05/19[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]4495[/TD]
[TD]05/04/19[/TD]
[TD]75[/TD]
[TD]56[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]4497[/TD]
[TD]05/04/19[/TD]
[TD]40[/TD]
[TD]452[/TD]
[TD]Stock No[/TD]
[TD]Sold items[/TD]
[TD]Profit[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]4662[/TD]
[TD]06/04/19[/TD]
[TD]54[/TD]
[TD]12[/TD]
[TD]40[/TD]
[TD]=?????[/TD]
[TD]=?????[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]3580[/TD]
[TD]07/04/19[/TD]
[TD]45[/TD]
[TD]25[/TD]
[TD]75[/TD]
[TD]1
[/TD]
[TD]56[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]4446[/TD]
[TD]08/04/19[/TD]
[TD]45[/TD]
[TD]120[/TD]
[TD]45[/TD]
[TD]2[/TD]
[TD]145[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]3783[/TD]
[TD]08/05/19[/TD]
[TD]45[/TD]
[TD]30[/TD]
[TD]54[/TD]
[TD]1[/TD]
[TD]12[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]1552[/TD]
[TD]08/05/19[/TD]
[TD]40[/TD]
[TD]38[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]8556[/TD]
[TD]08/05/19[/TD]
[TD]75[/TD]
[TD]75[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
if any one know if there is a way round it or if any one got different strategy i could use to make it happen thank you
 
Upvote 0
Put this formula in cell F5...

=COUNTIFS(C$2:C$10,E5,B$2:B$10,">="&E$2,B$2:B$10,"<="&F$2)

and this formula in cell G5...

=SUMIFS(D$2:D$10,C$2:C$10,E5,B$2:B$10,">="&E$2,B$2:B$10,"<="&F$2)

and then copy them down to the end of your data.

NOTE: Change the red row numbers to a row number that is equal to or greater than the actual row number for your last data item.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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