• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Addition of days/Weeks in current date

Tareen

New Member
Hi,


I have a worksheet for logistic planning. I have to add 6 weeks in current date if user select option of Via Sea Shipment and in case Via Air shipment I wanted to add 4 weeks in today's date. I am not familure with VB so like to use a formula for this problem.


Thanks in Advance.


Regards,


Tareen
 
Goo day Tareen


You could use the EDATE Function.....=EDATE(TODAY(),3), this has the TODAY() function followed by the number of months from today's date in this case three months to give the following date 27/03/2013


You could use the WORKDAY Function this example pulls a date from B2 and adds 42 working days to give the date of 25/02/2013, =WORKDAY(B2, 42, )


Don't forget the cells must be formatted with the date type
 
It sounds like there are 2 options...via sea=6 weeks & via air=4 weeks... Therefore, i would think an IF function could be helpful.


if we assume the choice for air/sea will be made in cell A1:

=IF(A1="Sea",[datecalculationfunction],[otherdatecalculationfunction])


Which date calculation function you would want, depends on something that bobhc touched on... do you only want "weekdays" to be counted? if so, you'll want to look at some of the various date fucntions (weekday, workday, etc) and apply them as needed.
 
Thanks guyes. I use following formula and its works for me.


=IF(Q7="By Sea",Customer!E5+49,IF(Q7="By Air",Customer!E5+30))
 
If these are the only 2 options, you could simplify your formula


=IF(Q7="By Sea",Customer!E5+49,Customer!E5+30)

or

=IF(Q7="By Sea",TODAY()+49,TODAY()+30)


glad to hear you got it working!
 
Back
Top