# Excel - IF Function Problem - Expert Solution

Question description:
This user has given permission to use the problem statement for this blog.

I need help with this formula. I need this to include months =INT((M4)/7)&" weeks"&IF(MOD(M4,7)=0,"",", "&INT(MOD(M4,7))&" days") I have the number of Days to Start with
Solved by F. A. in 29 mins
This is the chat thread from the real Excelchat help session. It contains no private user information.
Excelchat Expert 17/09/2018 - 01:47
Hello and welcome to Got it ExcelChat! I'll be happy to assist you with your concern. Before we get started, this is a reminder that our policy is 1 problem per session with additional Q&A on that problem as time allows. :)
User 17/09/2018 - 01:48
Sounds Good
Excelchat Expert 17/09/2018 - 01:48
I believe you need help in modifying your formula to include another data display, correct? :)
Excelchat Expert 17/09/2018 - 01:48
Will you be able to provide a sample data we could work on and to better illustrate the solution? Thanks!
User 17/09/2018 - 01:48
I believe so. I will add the formula to the shared sheet to the right of me screen
Excelchat Expert 17/09/2018 - 01:48
User 17/09/2018 - 01:51
I need this to output "Months weeks and Days
Excelchat Expert 17/09/2018 - 01:51
Okay, noted on that. Let me work on it for a while and update you the soonest! I believe I can do this within the time we have. :)
User 17/09/2018 - 01:51
If there is no data I need it to be "0" months ect
Excelchat Expert 17/09/2018 - 01:51
Noted on that. :)
User 17/09/2018 - 01:51
thanks
User 17/09/2018 - 01:52
I dont need to show decimals
Excelchat Expert 17/09/2018 - 01:52
Noted on that. :)
Excelchat Expert 17/09/2018 - 01:53
In this regard, btw, we need to define how many days does a month contain. Will it be okay if we assume 30 days per month?
User 17/09/2018 - 01:54
Yes. Im assuming the remainder will go in weeks and days
Excelchat Expert 17/09/2018 - 01:54
Noted on that.
Excelchat Expert 17/09/2018 - 02:02
Hi! I'm halfway there. I just need to tweak the formula a little bit for the days part, which is a bit tricky.
User 17/09/2018 - 02:02
OK
Excelchat Expert 17/09/2018 - 02:08
Excelchat Expert 17/09/2018 - 02:08
I included an additional INT and MOD functions at the start of the formula to consider the months values. Any remainder of this flows down in the weeks or days.
Excelchat Expert 17/09/2018 - 02:09
Assuming no. of days is at cell M4, the following formula answers your requirement: =INT(M4/30)&" months"&IF(MOD(M4,30)/7<1,"",", "&INT(MOD(M4,30)/7)&" weeks")&IF(MOD(MOD(M4,30),7)=0,"",", "&INT(MOD(MOD(M4,30),7))&" days")
User 17/09/2018 - 02:10
The out put says 265 Months?
Excelchat Expert 17/09/2018 - 02:10
Yes. That would mean that 7950 days is exactly 265 months.
Excelchat Expert 17/09/2018 - 02:10
Quite the coincidence. :)
User 17/09/2018 - 02:11
Thats not what I need
Excelchat Expert 17/09/2018 - 02:11
Sorry, what should be the outpu?
Excelchat Expert 17/09/2018 - 02:11
*output?
User 17/09/2018 - 02:11
I need it to Say "number of Month' Number of Weeks, and number of Days
User 17/09/2018 - 02:12
an example out put would be
User 17/09/2018 - 02:12
15 month 3 weeks and 2 days
Excelchat Expert 17/09/2018 - 02:12
And what if there are no days that flow in the weeks and days?
Excelchat Expert 17/09/2018 - 02:13
Do you want 15 months 0 weeks 0 days?
User 17/09/2018 - 02:13
it whould show 0
User 17/09/2018 - 02:13
yes exactly
Excelchat Expert 17/09/2018 - 02:13
Okay I see. Let me tweak the formula a bit.
User 17/09/2018 - 02:13
ok thanks
Excelchat Expert 17/09/2018 - 02:14
User 17/09/2018 - 02:15
Thank you
Excelchat Expert 17/09/2018 - 02:15
Do you have any more questions about the provided solution? :)
Excelchat Expert 17/09/2018 - 02:16
User 17/09/2018 - 02:16
Thank you.
Excelchat Expert 17/09/2018 - 02:16
Glad to be of help! :) If you don't have any more concerns, you may now end the session by clicking on the END SESSION on the upper right corner of your screen (since we can't do this on our end). I would as well appreciate it if you can provide a good feedback after the session ends. Thanks and have a nice day ahead! :)
User 17/09/2018 - 02:17
Not a problem. This is a great service

This is the output file from the real Excelchat help session:
This is an example of the expert help you can get. It contains no private user information.

Get instant expert help with Excel and Google Sheets

#### Post your problem and you’ll get expert help in seconds.

Your message must be at least 40 characters
Your privacy is guaranteed. Your session will not be used for blog unless you give us persmission.