Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I want to get 3 conditions by using if-else formula or any other relevant one.
I have 3 different dates Starts date, End date and Grace period date for an inventory.
I want "running" if today's date is greater than starts date but less than end date.
I want "Grace" if todays date is greater than end date but less than grace period
I want "Expired" if todays date is greater than grace period date.
I am using this formula but I am getting #value
IF(TODAY()>=E2<=F2,"Running",AND(IF(TODAY()>=F2<=G2,"Grace","Expired")))
You can't combine conditions like that. Instead of testing x>=y<=z, you need to use a logical AND and test both x>=y and y<=z.
=IF(AND(TODAY()>=E2, TODAY()<=F2),"Running",IF(AND(TODAY()>=F2, TODAY()<=G2),"Grace","Expired"))
For multiple if statements you should just use a lookup table instead
Put this in A1:A4 (for example - these are your start date, near to expiry date, finish date and grace date)
01/05/2014
05/11/2014
10/11/2014
10/12/2014
And the following in B1:B4
Running
Near to expiry
Expired
Grace
Your formula would then be:
=INDEX($A$1:$B$4,MATCH(TODAY(),$A$1:$A$4,1),2)
Change TODAY() in the MATCH() formula as needed
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
i have a list of ID's in one tab along with a start date and end date, Col A,B,C respectively. In a second tab I have a list of ID's, along with a due date in column B. There are duplicates in the second tab. I need to lookup the ID from the first tab, and return the max due date from the second tab prior to the start date. Also looking to do the opposite. Lookup the ID from the first tab and return the first date(min) after the end date. Hope that makes sense.
Apply the below formulas and drag down as needed
Max Due Date (Prior To Start Date) =MAXIFS(H:H,G:G,A2,H:H,"<"&B2)
Min Due Date (After End Date) =MINIFS(H:H,G:G,A2,H:H,">"&C2)
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I'm looking for how many days hours and minutes elapse between today and 27/08/2020 17:00.
Is there and formula where i can achieve this?
The output should look like this:
0 Year, 1 Month, 7 Weeks, 50 Days, 1,207, Hours, 72,427 Minutes, and 4,345,620 Seconds
There are a number of formulas that can help you here, here's how I would handle that.
Put your date in cell A1.
For years enter this formula in any cell:
=DATEDIF($A$1,TODAY(),"Y")
For months use the years formula, but change the "Y" to "M".
For days use:
=DAYS(TODAY(),A1)
For hours use:
=ROUNDDOWN((NOW()-A1)*24,0)
For minutes use:
=ROUNDDOWN((NOW()-A1)*24*60,0)
For seconds use:
=ROUNDDOWN((NOW()-A1)*24*60*60,0)
Applying the formatting you want will add a lot of length, put this formula in any cell:
=DATEDIF(A1,TODAY(),"Y")&" Years, "&TEXT(DATEDIF(A1,TODAY(),"M"),"#,###")&" Months, "&TEXT(DAYS(TODAY(),A1),"#,###")&" Days, "&TEXT(ROUNDDOWN((NOW()-A1)*24,0),"#,###")&" Hours, "&TEXT(ROUNDDOWN((NOW()-A1)*24*60,0),"#,###")&" Minutes, and "&TEXT(ROUNDDOWN((NOW()-A1)*24*60*60,0),"#,###")&" Seconds"
You could use
=NOW()-DATEVALUE("08/27/2020")+17/24
in the cell you want, and then just format that cell using custom formatting like this:
yy "years" mm "months" dd "days" hh "hours" mm "minutes"
You'd need to either refresh that cell regularly, or you can use the Application.OnTime command in a macro to have it recalculate for you.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm trying to write a vlookup formula that will
1). check for duplicates in the list and
2). if there is a duplicate, then check the dates, and pull the correct rate in the vlookup return value, depending on the date.
So for example, if Michael has a rate of $100 per hour for 7/1/2017, I can assume this is his rate until noted otherwise with an additional line. On 7/3/2017 his rate changes to $120. So for hours worked on 7/1/2017 and 7/2/2017, the rate should be $100, but on 7/3/2017 and on, the rate should be $120, or until a new line is added for Michael indicating a new rate on a specific date.
Can anyone help with this?
Thanks!
You could do something like this if you sort by name and by date descending
Note it's an array formula so you need to use Ctrl+Shift+Enter
You could do this with MAXIFS(). The multiple conditions lets you find the multiple conditions, but MAXIFS() will always return an individual value unlike SUMIFS or COUNTIFS. Place hte formula in cell F2 and fill it down
=MAXIFS('Effective Rate'!$C:$C,'Effective Rate'!$A:$A,A2,'Effective Rate'!$B:$B,"<="&B2)
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I need the total number of cells in sheet-1 Column B that are less than 16 hours where Sheet-1 Column A is not equal to 5 in sheet 1 E4 cell.
For Ex please see the image attached.
Please click on this link to find the example
Assuming that
column A of sheet1 are date/times, and not text, and
you are attempting to find how many date/times are more than 16 hours old
then you simply want to place the following formula in sheet2!F7:
=COUNTIF(sheet1!A:A,"<"&NOW()-0.75)
(16 hours is 0.75 of a day.)
If the data in column A is text, then it gets slightly harder as you have to ensure that Excel does not treat the NOW()-0.75 as a date/time. You can trick it by adding an extraneous character to the end of the formatted date/time so that it no longer appears to be valid, e.g.
=COUNTIF(sheet1!A:A,"<"&TEXT(NOW()-0.75,"yyyy/mm/dd hh:mm:ss")&"#")
worked for me. (The extra "#" at the end forced it to no longer be a valid date/time string.)
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
i want to create a formula like this,
=DATE(YEAR(any)),MONTH((any)),14)
i don't care about year or month only the day.
apparently excel doesn't let me add "any" as a fuction. can someone please help me?
Consider:
=DATE(RANDBETWEEN(1,9999),RANDBETWEEN(1,12),14)
To use the current year and month, use this formula:
=DATE(YEAR(NOW()), MONTH(NOW()), 14)
However, the month does matter if you wanted to put 31 for the day (or 29/30 if the month happens to be February), so you might want to just always use a specific year and month that will allow for maximum flexibility, such as:
=DATE(2000,1,14)
One thing I would suggest is to ask yourself why you are storing this as a date in the first place if you only care about the day of the month. You could just store 14 and label the column "Day of Month". To better answer your question, it would be helpful to know what are you actually doing with these dates.