Count How Many License Registered in the specific month - excel-formula

How to formula using CountIf function in Excel to get the count of licenses registered in January given the Register date is complete date format. Below is the sample structure of Excel data. As shown in the table below, there are 3 licenses registered in the month of January.

You can add a new column for the month, which I'll call B, and put the following function in the first cell of that column, and then copy it down:
=Month(B1:B4)
Then where you want the count to appear (I used C5), use the following formula:
=CountIf(B1:B5, 1)
This displays the following results:
This correctly performs the count regardless of the date format for the cell, as long as it's a date. In other words, it works for mm/dd/yyyy, d/m/yyyy, dd/mm/yyyy, and yyyy/mm/dd equally as well, which removes the issue of trying to parse out the first two characters of a string.

I tried various methods but i had to unfortunately use helper column to extract month number from dates. I used left function to extract month number as Left(B2,2). Then i used countif function to count all cells have "01" countif(C2:C6,"01"). This is not the best solution but it worked.

Related

Using COUNTIFS with different date formats

I am trying to calculate the totals of a column when the date column is within a certain month. The value to find is in a different date format to the format in the criteria range and I can't figure out how create a formula using the two different date formats. Here are the columns where I am trying to get the totals from:
Here is where I am trying to count the rows when it falls within a certain month and year:
This is the formula I have created but this doesn't work and just returns 0:
=COUNTIFS($A$3:$A$27, YEAR(G3), $A$3:$A$27, MONTH(G3))
I have also tried this but it is still returning 0:
=COUNTIFS($A$3:$A$27, "=YEAR(G3)", $A$3:$A$27, "=MONTH(G3)")
Format is irrelevant if your dates are REAL dates
If your dates are "real" dates, merely formatted a certain way
And if your Months are also real dates where the date is actually the first of the month,
Then:
=COUNTIFS(Dates,">="&B15,Dates,"<=" &EOMONTH(B15,0))
Where Dates is the Named Range containing your list of dates, and B15 contains your month/year formatted first of the month date.
If your months column is not the first of the month, then a minor change is all that is needed to convert the first criteria to the first of the month:
=COUNTIFS(Dates,">="&DATE(YEAR(B15),MONTH(B15),1),Dates,"<=" &EOMONTH(B15,0))

Guide me Regarding Compare the Value of Cell contain date and other cell contain Drop down list

Hy Every One, I need help in excel formula, I have two sheets, sheet1 for sale tracker, sheet two for goals tracker, I used Now() to enter date automatically, and its working fine, Next in goal sheet, I use =Sumif() to calcualte various category totals and refer them in cell. Its also working fine. But I want to track record according to month and category. Like I have 6 categories detail is as under,
Sales Tracker
In the First picture Column Date consist of formula "=IF(ISBLANK(B5),"-",TODAY())" and it display the name of month like "October"
While in second picture there is a drop down list of "Month" Column.
1- I want to use if statement like =if(Date=Month, Sum(Revenue Secure column Data), "-") But its not working the formula I wrote here is an example....
2- I want when I select any month from second sheet like January, February, It should calculate sum from picutre one data and only show the sum of january etc.
Please help me, this is eating my brain a huge,,,,,,:)
Thanks in advance....
In short my question is how can I use If statement to compare value of cell that contain formula and other that contain drop down list?
Or use the MONTH function to change your date to a number 1 to 12 corresponding to the month. Then have the combo return a number for the month chosen. It might be faster using integers than test
I Believe you have to compare the month and not the whole date.
You can do TEXT(NOW();"mmmm") to get the full month name of the current data (in the language of excel) and then compare it to your drop down.
If you replace the NOW() with any data it works as well.

Excel using COUNTIFS Function to create a Punchcard

In my data source I have a column that contains the Dates of occurrences and a Column that contains the Hour of the same occurrences.
With this, the goal is to obtain a punchcard plot (maybe the bubble chart will be the most appropriate)
The intermediate structure has the weekday(Sunday-Saturday) as rows (A2:A8), and the hours (8-22) as Columns (B1:P1), as each column must have the occurrence count for a week day in an hour.
With this said, I tried to use the COUNTIFS function, using the following approach, for the cell B2:
=COUNTIFS(WEEKDAY(RawData!T2:T9852;1);A2;HOUR(RawData!U2:U9852);B1)
However, Excel is not computing the value, finding a problem on the formula, having also tried using the Insert Formula Option.
place the following in B2
=SUMPRODUCT((WEEKDAY($T$2:$T$8,1)=WEEKDAY($A2,1))*(HOUR($U$2:$U$8)=HOUR(B$1)))
you will need to convert the , to match the ; on your system
In your range A2:A8 enter a known date for monday such as 2017/08/20. Then select A2:A8 and apply custom formatting for the number format and set it to ddd. This will display the day of the week in text but keep the value in the cell a number.
Adjust the ranges to suit your data.
Copy the formula to fill in your table.

Countif with dates does not work

I couldn't find a similar question that's why I asked a new one.
I have a worksheet with two columns - first column shows month and year in the following format "mon.year", for example "apr.2017" and the second one shows a number. The number must represent the count of some other dates filtered by specific criteria. I have those dates in another sheet - one column with name and one with a date.
What I want to do is count the number of dates for example from june 2017 from the second sheet and place the number in the second column in the first sheet.
Here is how the first sheet looks like:
And this is how the second sheet with data looks like:
The result I'm looking for is this:
So, I tried the following code but I can't figure out why it doesn't work.
Any suggestions how to improve the formula?
EDIT: So, both the comments below were helpful for me but as the formula had to be simplified at most (my colleagues work with the excel file, not me) I chose to calculate the month and year in two hidden columns, then use the countif formula on them.
You will need to bracket the dates:
=COUNTIFS('1'$B$2:$B$26,">=" & EOMONTH(A2,-1)+1,'1'$B$2:$B$26, "<" & EOMONTH(A2,0)+1)
For Excel, a date/time is just a formatted number, the number of days since a fixed epoch.
"="&MONTH(A2) is an expression which concatenates the string = with the result of the function MONTH(A2), which is 1. The result of the expression is =1, which is what COUNTIFS sees.
You're actually telling COUNTIFS to match the date/time whose serial number is 1 (December 31, 1999 at midnight). Similarly, the second criteria will match exactly on July 9, 1905 at midnight.
My suggestion for you is to compute the month and year of each date on separate columns, and use COUNTIFS on these columns.

Calculate number of rows with current month & year in Google Sheets or Excel, when dates are in ISO format

I have one column filled with dates in ISO format (with header row), such as:
DATES
2015-05-13 12:46:41
2015-03-19 11:50:13
I would like to count the number of rows which match the current month & year. In the example above, the result would obviously be one (when it's May 2015).
Is this possible to achieve this result using a function in Google Spreadsheet?
Same question without ISO date can be found at:
Calculate number of rows with current month & year in Google Sheets or Excel
If those are text values, as per my comment, then the suggested formulas in the link won't work - either convert as suggested or you can use this formula to count text values that represent the current month
=COUNTIF(A:A,TEXT(TODAY(),"yyyy-mm-")&"*")
or avoiding date formats in text function
=COUNTIF(A:A,YEAR(TODAY())&"-"&TEXT(MONTH(TODAY()),"00")&"-*")
change commas to semi-colons depending on regional settings

Resources