I want to count number of sales in this month till present & also need to count for only today's sales upto current time.

sapxl

New Member
Joined
Jun 20, 2020
Messages
24
Office Version
  1. 2016
  2. 2013
  3. 2011
  4. 2010
  5. 2007
Platform
  1. Windows
Hello Friends,

I'm trying to count the number of sales for the current day and current time…
Also I want to count number of sales in this current month still the current month is going on currently (i.e, upto present day& time).. if any sales increase in next moment, then counting need to be increased..
using countif function, but unable to do so, can you help me on this.

with my formula: SUM(COUNTIFS(D4:D17,">=1-May-20",D4:D17,"<=31-may-20"))
It is giving only current month..and when i'm trying to use the below formula for present time updated, it is not giving the expected solution..
=SUM(COUNTIFS(D4:D17,">=1-May-20",D4:D17,"=today()"))

Appreciate your help in this regard.


 

Attachments

  • counting only todays numbers of sales and also this month sales.PNG
    counting only todays numbers of sales and also this month sales.PNG
    90.7 KB · Views: 8

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Can you please post some sample data using the XL2BB add-in, it's very difficult to tell why something isn't working from an image.
 
Upvote 0
" when i'm trying to use the below formula for present time updated, it is not giving the expected solution. "

Try:
=SUM(COUNTIFS(D4:D17,">=5/1/2020",D4:D17,"<="&TODAY()))
 
Upvote 0
Hi Friends,

Below is the range for the count function

COUNTING ONLY TODAYS NUMBER OF SALES and THIS MONTH NUMBER OF SALES.xlsx
CDEFGHIJ
41-May-20 7:22 PM
59-May-20 7:22 PM
613-May-20 7:22 PM
7Date Format I'm using.. >>>>22-Jun-20 7:22 PM
8d-mmm-yy28-Jun-20 7:13 AM
929-Jun-20 7:13 AM
1030-Jun-20 7:13 AM
1110-Jul-20 7:22 PM
1211-Jul-20 7:22 PM
1312-Jul-20 7:22 PM
1413-Jul-20 7:22 PM
1514-Jul-20 7:22 PM
1615-Jul-20 7:22 PM
1716-Jul-20 7:22 PM
18
19
20
21
22
2303
24
25COUNT NUMBER OF SALES TAKEN PLACE IN TODAY
26COUNT NUMBER OF SALES TAKEN PLACE IN THIS MONTH
27
28Hello Friends,
29SUM(COUNTIFS(D4:D17,">=1-May-20",D4:D17,"<=31-may-20")) It is giving only current month..and when i'm trying to use the below formula for present time updated, it is not giving the expected solution.. =SUM(COUNTIFS(D4:D17,">=1-May-20",D4:D17,"=today()")) --
Sheet1
Cell Formulas
RangeFormula
C23C23=SUM(COUNTIFS(D4:D17,">=1-May-20",D4:D17,"=today()"))
D23D23=SUM(COUNTIFS(D4:D17,">=1-May-20",D4:D17,"<=31-may-20"))
 
Upvote 0
Thanks for that
How about
+Fluff New.xlsm
ABCD
1
2
3
41-May-2020 07:22 PM
59-May-2020 07:22 PM
613-May-2020 07:22 PM
722-Jun-2020 07:22 PM
828-Jun-2020 07:13 AM
929-Jun-2020 07:13 AM
1030-Jun-2020 07:13 AM
1110-Jul-2020 07:22 PM
1211-Jul-2020 07:22 PM
1312-Jul-2020 07:22 PM
1413-Jul-2020 07:22 PM
1514-Jul-2020 07:22 PM
1615-Jul-2020 07:22 PM
1716-Jul-2020 07:22 PM
18
19
20
21
22
2373
Main
Cell Formulas
RangeFormula
C23C23=COUNTIFS(D4:D17,">=01/05/2020",D4:D17,"<="&TODAY())
D23D23=COUNTIFS(D4:D17,">=1-May-20",D4:D17,"<=31-may-20")
 
Last edited:
Upvote 0
Try it..
For Current Period:
IFERROR(IF(D2=MAX(D:D),COUNT(D:D),""),"")
For Last Day:
IFERROR(IF(D2=MAX(D:D),COUNT(D:D),""),"")
For Last 7 Days:
IFERROR(IF(D2>=TODAY()-7,COUNT(D:D),""),"")
 
Upvote 0
Hi Fluff,
That code is working great, i needed for current month automatically, i do not need to change the month everytime, like today, is the automatically updated function, it currently updating the formula and calculating whatever number of sales or members registered today... similarly for current month automatically it should pickup the current month and update the calculation of number of sales or members in this month when entries are keep on added and the numbers to be increased as per the calculation... hope i have conveyed.
 
Upvote 0

Forum statistics

Threads
1,215,388
Messages
6,124,648
Members
449,177
Latest member
Sousanna Aristiadou

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