COUNTIFS in Google Sheets - excel

I am trying to create a countifs formula that counts cancellation dates of clients by month, but the condition I want to also implement is not to count if the cancellation date was today's date (which is input in cell B1 at the top of the document).
So, for the november row, i have the formula =ArrayFormula(countif(month(H4:H89),11)) which works to count every cancellation date that happened in the month of november, but I want to add a condition that says, "but don't count if date =B1 enter code here where B1 contains that day's date.
I've tried converting the conditions in the array formula to a countifs formula but it never seems to work. Please help!

Use COUNTIFS:
=ArrayFormula(COUNTIFS(A2:A,"<>"&B2,MONTH(A2:A),11))

Related

I need the updated sum from 1st to the current date

I have extracted the cell address of the current date by using:
=CELL("Address",INDEX($H$4:$AK$4,MATCH(G3,H4:$AK$4,1)))
G3 contains the day number of the month.
Now I need to use the Sum formula in G6 such that it adds the values from 1st to the current date which is updated by the function Today() in cell G1.
Is there a way I can use the Sum function to use the address inside the cell rather than the address of the cell.
You can download the sheet from here.
I think you are making it too difficult. Just use SUMIF, and make the criteria that the dates are less than today.
=SUMIF(date_range, "<"&TODAY(), sum_range)

Referring to a cell in a formula, but wanting to use the cell reference in that cell, not that actual cell itself

I want to make it so I can build a count formula in one sheet that I can just drag down.
the cells being counted are on a different sheet.
Start Ref Date
29-Mar
19-Dec 37
21-Jan 29
28-Feb 14
Essentially what is happening here is that the numbers that are NOT dates are the counted cells between the Ref Date and the Start (what I am tracking doesn't follow a calendar so I can't just subtract the start from the ref date).
I hard coded the count formula to get each of the number of days between ref and start. I'm lazy. I want to make it so the count refers to the referenced value in the start and ref date columns.
current forumla:
=COUNT('SHEET1'!FQ$1:HA$1)
Desired Forumla:
=COUNT($B3:$B$2) where B3 is the referred to start taken from Sheet 1 and B2 is the ref date taken from Sheet 1. That way I only have to change B2 in order to update the count.
How can I refer to a specific value in a cell that is taken from a different sheet???
thanks for the help so far. I'm not sure excel itself can do everything I want it to. I ended up taking an online course in macro's and VBA for Excel.
This solution assumes the dates to count are layed out as below on sheet2:
Lay out your start and reference dates similar to the following:
In cell D3 from the above example, use the following formula:
=COUNTIFS(Sheet2!$C$3:$J$3,">="&Sheet1!B4,Sheet2!$C$3:$J$3,"<="&Sheet1!C4)
That formula can be copied down as required to match your entries for start and reference dates.

Incorrect calculations? Excel not performing correct time calculations

I'm simply trying to find the number of hours between the two dates and times, but excel won't account the date to the number of hours, and only calculates the 'hours' themselves.
Your format on cell B3 is wrong. You may have mistakenly copied the date format from the cells above to B3.
If you set your format to "General" on cell B3 and change the formula to
=ABS(B1-B2)*24
I think you'll get the result you're looking for.

Last Day of Previous month based on cell date given in excel

Last Day of Previous month based on cell date given in excel , example used A1 cell as 6/23/2016 …. Have applied formula in b1 cell '=EOMONTH(A1,-1) … output am getting in number format could you please help to get date format here ? Any formula which helps apart from this ? Much appreciated with your responses
The format is applied as follows:
Subtract the day-of-month from whatever date you have.
=a1-day(a1)
Excel tries to carry the primary formatting from the precedent cells in a formula but sometimes it cannot so it defaults to a general number. EOMONTH is often the latter; simple subtraction seems to work.

COUNTIF function if day of week is Tuesday

I need to count a column only if the corresponding cell in another column is a Tuesday. An example image is:
Initially, I was trying to use a COUNTIFS function paired with a WEEKDAY but I can't get it to work.
=COUNTIFS(B2:B32,TRUE,A2:A32,WEEKDAY(3))
or
=COUNTIFS(B2:B32,IF(A2=WEEKDAY(3),1,0))
Each unit needs to be counted on Tuesday every week. If they count a day before or after it's considered late. What needs to happen, is each unit needs to have a count of the number of days that they did count and then the number of days that they didn't count. In the past, I have accomplished this last part by a simple arithmetic formula based on the number of days in the month. In addition to the two counts, I also need any missed cells to be filled in with a red background.
The actual sheet has several tables in the same format ranging from 1 column to 65 columns.
Please try, in B34:
=SUM((WEEKDAY($A2:$A32)=3)*(B2:B32<>""))
entered with Ctrl+Shift+Enter and copied across to D34.
I am assuming you are able to count the number of Tuesdays in the relevant month and complete Row35 by deducting from that number the value in the cell immediately above.
Afterthought:
You have also what is really a completely separate question in your post (the red background) which I think is best handled with conditional formatting. Select B:D and in Conditional Formatting, New Rule... select Use a formula to determine which cells to format and under Format values where this formula is true: enter:
=AND(WEEKDAY($A1)=3,B1="")
Click Format..., select Fill and red, OK, OK.
You can insert an column B and fill it with the following formula:
=IF(WEEKDAY(A2)=3,1,"")
=IF(WEEKDAY(A3)=3,1,"")
...
Then you can count them with the following formulas:
Days counted =COUNTIFS(C$2:C$32,">0",$B$2:$B$32,1)
Days not counted =COUNTIFS(C$2:C$32,"",$B$2:$B$32,1)
You can hide the column B if you wish.

Resources