Excel multiple IF statements, AND statement, and MONTH function - excel

I am working on an excel sheet where I have a month and year value stored in cell D3 as text, this is a start date. The cell contents look like "January 2018". Additionally, in cell F3, I have the end dates which are stored as text. The cell contents look like "April 2018".
The formula I am hoping to build will create a space if D3 is equal to the month of July or if D3 is less than July and F3 is greater than July.
The current formula looks like this:
=IF(MONTH(D3)=6," ", IF (AND(MONTH(D3)<6,(MONTH(F3>6))," ",)))
Any recommendations to get the desired outcome. Thank you!

Maybe:
=IF(OR(MONTH(D3)=7,AND(MONTH(D3)<7,MONTH(F3)>7))," ")

Related

In one specific cell have it output to 2 specific cells

What I would like to do is use a excel function in one specific cell to output to the cell next to it. So as you can see in the image below I enter =TODAY(). What I would like to do is in cell c4 is used today function to enter todays date in cell 4 and in Cell d4 enter the date 3 days later. So if possible in cell c4 I would enter a function that states todays date in cell c4 and the workday 3 days later.
For versions that support Dynamic Arrays, create a formula that Spills the result you want
Example
=WORKDAY(TODAY(),{0,3})
To make the number of days offset variable, use SEQUENCE to generate the offsets
=WORKDAY(TODAY(),SEQUENCE(1,2,0,D7))
For Non-Dyanamic Array versions, the first formula could also be entered as a array formula (CSE) into C4:D4
If you only ever want to use Today() as the starting date, you can use this:
=TEXT(TODAY(),"ddd, dd-MM-yyyy")&" - next workday: "&TEXT(WORKDAY(TODAY(),3)," dddd")
If you want the user to enter a date, that entry must be in a different cell, and you need to replace the Today() function in the formula above with that cell reference.

Excel date increments next month based on another date

I have an overly complicated spreadsheet to show when employees have taken leave from dates in a table. It behaves differently based on if today is before or after their anniversary date. There are no macros, I'd like to keep it that way.
Currently:
Cell A1 = Today()
cell A2 = date pulled from a table, displayed as 01/01/20
I'm trying to have Cell A1 display the first of next months date if the date in cell A2 is the current month. This would push my calendar into the next years schedule. It is April, if an employee's anniversary is in April I would like A1 to show 5/1/20.
So, if A2 is not the current month, A1 shows Today(). If A2 is the current month, A1 shows the first day of the next month.
Something like this, maybe:
=IF(TEXT(TODAY(),"yyyyMM")=TEXT(A2,"yyyyMM"),DATE(YEAR(TODAY()),MONTH(TODAY())+1,1),TODAY())
Looking at the situation you present, this is I think the formula you need to use in A1:
=IF(MONTH(A2)=MONTH(TODAY()),EDATE(A2,1),TODAY())
so, we have:
If A2 month is the Current Month: MONTH(A2)=MONTH(TODAY())
Then use the next month first date: EDATE(A2,1)
Otherwise use Today's date: TODAY()
Hope this will solve your problem.

excel check caller cell on a formula

I have something like
January - February ...
Whatever:
It is, each column is a month and then 1st row has the month name, 2nd row has the number of whatever attribute i want (I'm just putting an example). My idea is to put something like.. in each cell under the month: =cellSomething
and in cell something I should check from which cell I'm calling and then check the month (upper cell) and do something like =If(callerCell.upper.month < May) = 5 else 10
how could I check the caller cell or pass a cell or value to the function?
I'm not entirely sure I understand the requirement, but I would go with something like this:
Use dates rather than names for your column headers (you can then apply formulas to them and also use a custom number format to display the month name). So something like this is what you seem to be asking for:
A1: 01/01/2017
B1: =DATE(2017,MONTH(A1)+1,1)
drag this across to L1
format A1:L1 with a custom number format: mmmm
A2: =IF(MONTH(A1)<5,5,10)
drag this across to L2
We already know where the months are in the first row, so in B1 enter:
=IF(COLUMN()<5,5,10)
and copy across.

Get number of days for a month from given month and year EXCEL

Let say cell A1 has year
cell B1 has month
In cell C1 I want the number of days of month given in cell B1 in the year A1
For example: If A1=2016, B1=2, now C1 should return the number of days in February 2016.
What I have tried
In C1
=DAY(DATE(YEAR(A1),MONTH(B1)+1,))
But this does not work
I'd be grateful for a solution.
Consider:
=DATE(A1,B1+1,1)-DATE(A1,B1,1)
Or you may try this...
=DAY(EOMONTH(DATE(A1,B1,1),0))
Less transparent but this will also work
=42-DAY(DATE(A1,B1,42))
format as general
Excel have a lot of functions that are unknown for most users. EOMONTH is the function you need in your case. It returns the last date of the month for a given date.
Consider you have a cell A1 with TODAY function and you want the last date of the month. In B1 you put:
=EOMONTH("A1",0)
So in B1 will show 30/04/2017 (for those whose date format is dd/mm/yyyy).

Excel Date Formula

I have 3 cells in Excel as follows:
Cell
A1=2012
A2=12
A3=15
Which contains year, month & date value respectively. And I want to make a date string out of it.
I know it's very easy to achieve using Date function.
But I also want the cell to remain blank if any of A1,A2 or A3 is blank.
something like
=IF(COUNT(A1:A3)=3,DATE(A1,A2,A3),"")

Resources