janema
Board Regular
- Joined
- Nov 28, 2022
- Messages
- 143
- Office Version
- 365
- 2021
- 2019
- 2011
- 2010
- Platform
- Windows
- Mobile
I am trying to get this formula (in column F to calculate the time in role, but with multiple conditions. My formula currently is:
=IF(G5="","",IFERROR(DATEDIF(G5,$I$1,"y")&" yrs "&DATEDIF(G5,$I$1,"ym")&" mos",""))
Note: the current date is a hidden cell that is locked in the formula because that date will just be "today's date"
What I am trying to do is all of the above, but ALSO add in that if column D is "N/A" then to use the dates from column K and the "current date" to calculate the time in current role. PLEASE HELP.
When I add in that nested formula, it keeps telling me I have too many arguments.
Tried this and no luck:
=IF(G5="","",IF(G5="N/A",DATEDIF(G5,$I$1,"y")&" yrs "&DATEDIF(G5,$I$1,"ym")&" mos"), IFERROR(DATEDIF(G5,$I$1,"y")&" yrs "&DATEDIF(G5,$I$1,"ym")&" mos",""))
So CONFUSED.
Essentially, I want the formula to give me the current time in role, but if column D is blank, just to leave it blank, and if column D is "N/A" then to use the date in column K instead of the current date I am using.
=IF(G5="","",IFERROR(DATEDIF(G5,$I$1,"y")&" yrs "&DATEDIF(G5,$I$1,"ym")&" mos",""))
Note: the current date is a hidden cell that is locked in the formula because that date will just be "today's date"
What I am trying to do is all of the above, but ALSO add in that if column D is "N/A" then to use the dates from column K and the "current date" to calculate the time in current role. PLEASE HELP.
When I add in that nested formula, it keeps telling me I have too many arguments.
Tried this and no luck:
=IF(G5="","",IF(G5="N/A",DATEDIF(G5,$I$1,"y")&" yrs "&DATEDIF(G5,$I$1,"ym")&" mos"), IFERROR(DATEDIF(G5,$I$1,"y")&" yrs "&DATEDIF(G5,$I$1,"ym")&" mos",""))
So CONFUSED.
Essentially, I want the formula to give me the current time in role, but if column D is blank, just to leave it blank, and if column D is "N/A" then to use the date in column K instead of the current date I am using.