Check if Date is in the past & if a cell is blank - excel

I am trying get excel to show the word "Error" if the date in cell M2 is in the past AND if column L2 is blank however this is not working, any help is much appreciated!
It would be even better if I could get it to see if the date IS today or before today, rather than just before today
=IF(AND(M2<TODAY(),L2=""),"ERROR","OK")

Try This
=IF(AND(M2<=TODAY(),ISBLANK(L2)),"ERROR","OK")

I've replaced commas with semi-colons in Google Sheet and it works:
=IF(AND(M2<=TODAY();L2="");"ERROR";"OK")
Check your regional settings, as user #SJR pointed out.

Related

Find date in range gives blank

I have the following formula:
=IFERROR((INDEX(TRACKER!$A$2:$A$500, SMALL(IF(AND($B$3<=TRACKER!$C$2:$C$500,$B$4>=TRACKER!$C$2:$C$500),ROW(TRACKER!$C$2:$C$500)-MIN(ROW(TRACKER!$C$2:$C$500))+1, ""), ROW($A1)))),"")
That pulls data depending on the beginning IF(AND( statement. I was trying to get it to pull dates that are between B3 and B4 (so, >=B3 but <=B4)
The problem is, it doesn't seem to like my AND statement and keeps pulling nothing (""). If I delete one of the statements in the AND and just pull >=B3 or <=B4, it works fine...so it's not a date formatting issue.
Would appreciate any way to incorporate date range into this array formula, thank you.
Perfect Scott, thank you very much as always for the swift and concise response. I replaced it with a "*" and it all worked out. Appreciate it.

IF Function Query - Extended

I got an answer for a previous question regarding an IF function on my excel tracking sheet.
I would like to further this by adding another formula to the existing formula.
I am looking for some help regarding an IF function on an Excel
document.
Basically if the Date Listed cell is dated over 1 month ago (eg: Date
Listed 6-Aug but today is 6-Sep) and the Date Sold cell is blank, then
I would like the Mark Down cell to say 'MARK DOWN', which at the
moment it does but it is only 10-Aug today.
If the Date Listed cell and the Date Sold cell both contain dates I
would like the Mark Down cell to say 'OK'.
So far I have this written:
=IF(AND(DATE(YEAR(G2),MONTH(G2),DAY(G2)), ISBLANK(H2)),"MARK DOWN","OK")
I know I'm not far off but I need help sorting out the
last parts..
Bonus if you can help me add a highlighted cell formatting to it :)!
Example Image
******Original formula:
=IF(AND((TODAY()-G11)>31,ISBLANK(H11)),"Mark Down","No")******
My additional query is:
If this item hadn't been uploaded yet, therefore there would be no date in the Date Listed cell, I would like to have an ISBLANK function which returns with "Not Required".
I have read something about ampersands and joining functions but not sure how to use them properly.
Here is what I have so far:
=IF(AND((TODAY()-G19)>31,ISBLANK(H19)),"Mark Down","No"), OR(ISBLANK(G19)),"Not Required")
Thanks again.

Counting Cells in a Range that Contains Formulas, Only when a Date is Returned?

Frequent browser, first time poster. Please go easy:
I have spent the last few days searching online, and on here for a solution to a problem I have encountered for the first time. I have a report that pulls from multiple worksheets. One column is a formula that does a VLOOKUP to another sheet and pulls back a date, if it exists. I then have a cell at the top of the sheet that calculates how many dates are pulled back out of all of the rows (to calculate % complete). This is where I am having the problem. I have tried variations of COUNTIF, COUNTA, COUNTBLANK, and so on, and formulas trying to reverse calculate,
=SUM(C4)-COUNTIF(Table3[2014 Process Date],"")
At first it appeared to work, but in this example, I had 1949 rows, and dates only populated in 7 of those rows. In theory it should return 7. Instead it is returning 237. I have done multiple filters, and manually reviewed the data in the column, and only 7 dates are there. The column has the VLOOKUP in and IFERROR nest,
=IFERROR(VLOOKUP(A12,Table_TaxData.accdb3[#All],240,FALSE),"").
I am guessing I am overlooking something silly, and was hoping someone would be able to help steer me in the right direction, or let me know what I am missing. Thanks in advance for any help!
Wow, looks like I need some more coffee! Thank you, I guess I assumed that it would be much more complicated than that. I just threw in
=COUNT(Table3[2014 Process Date])
And it worked like a charm! Thanks again!
If I'm reading your formula correctly, the target cells hold either the DATE, or a blank "".
If so, you can do a COUNTIF and do this:
=COUNT(B:B)
to get # of dates.
or
=COUNTA(B:B)-COUNT(B:B)
to get # of blanks.
(I used column B, not sure where your final values are in you're looking for - adjust accordingly)

Excel 2013 SUMIFS with multiple criteria one being data filter

I need to sum data based on 3+ criteria one being the month.
"Usage" tab contains entries forA=Date C=department, D=fuel E=Gallons
Im trying to generate a monthly report where the following is true
fuel=diesel, dept=public works, month=B2 (B2 is a month by number drop list, problem still exist if I substitute 1, 2, 3, etc.)
I can get the below formula to work until I add the date field, either I get #NAME?, or an error regarding my formula. Any suggestions would be appreciated.
=SUM(IFS(Usage!$E:$E,(Usage!$D:$D),"Diesel",(Usage!$C:$C),"Public Works",MONTH(Usage!A:A),B2))
Thanks
Vona
If B2 contains =MONTH(A2) (copied down), please try:
=SUMIFS(Usage!E:E,Usage!D:D,"Diesel",Usage!C:C,"Public Works",Usage!B:B,X2)
Note no parenthesis in the middle of SUMIFS. X2 (or to suit) contains the month number of your choice (so may not work across years).
This is the solution I found that provided the correct answer. Thanks to all who made helped, your suggestions pointed me in the right direction!
=SUMPRODUCT((Usage!D2:D6="Diesel")*1,(Usage!C2:C6="Public Works")*1,(MONTH(Usage!A2:A6)=B2)*1,(YEAR(Usage!A2:A6)=C2)*1, Usage!E2:E6)

Removing hyphens from a cell in Excel

I am looking to take the hyphen or dash out of a birthdate.
01/01/01
01-01-01
I need to combine the birthdate with other fields and it can't have the seperator in it.
I am sure there is a better way. I can get the month and year out, using left & right however I can't figure out how to get the middle out. Below is what I have so far and I know that I can combine them using "&"...if someone can help me with the middle or give me a better equation I would appreciate it.
LEFT(A1,2)
RIGHT(A1,2)
Solution:
=LEFT(F2,2)&MID(F2,4,2)&RIGHT(F2,4)
if it is a string, (not formated as a date) then you can use
MID(A1,4,2)
otherwise i just use the MONTH(A1) DAY(A1) YEAR(A1) functions
I'm not sure what an excel formula is so this answer might be irrelevant...
VBA has a Mid function that would do what you want I believe. This page has good explanations for that and the other similar functions: http://www.vbtutor.net/VBA/vba9.htm
You could also do a Find and Replace to replace the "-" with nothing.
Ctrl + H will bring up the Replace dialog box.
Change the number format of the date to something line "mmddyy". To combine it with other text in another cell, use a formula like:
="The date is "&TEXT(A1,"mmddyy")
where the date is in cell A1.

Resources