Thanks Paul! Got the solution and as well knowledge!
 
Regards,
Pankaj
On Tuesday, June 17, 2014 8:43:44 PM UTC+5:30, Paul Schreiner wrote:

> Here we can make use of a couple of different concepts:
> #1) Excel stores dates as numbers (the number of days since 1/1/1900).
>   So, if your date (June 3, 2014) is in cell A1, the date 9 days previous 
> to that is A1-9
>  
> #2) The Excel function Weekday() returns the "day number" of the weekday.
>       the function has optional parameters that let you establish the 
> "first" day of the week.
>       So, =WEEKDAY(A1-9) will return Sunday=1 through Saturday = 7
> but if you use WEEKDAY(A1-9,2) then it will make Monday=1 and Saturday and 
> Sunday are 6 and 7(Friday =5)
>  
>   So, if we test to see if the result of A1-9 is <= 5, we can use the date.
>   If it is 6, then it's a Saturday and you need to add 2 days. 
> Otherwise, add 1 day.
>  
> You end up with a formula like:
>  
> =IF(WEEKDAY(A1-9,2)<=5,A1-9,
>   IF(WEEKDAY(A1-9,2)=6,A1-9+2,A1-9+1)) 
>  
> Of course you could simplify it with:
> =IF(WEEKDAY(A1-9,2)<=5,A1-9,
>   IF(WEEKDAY(A1-9,2)=6,A1-7,A1-8))
>  
> *Paul*
> -----------------------------------------
>
>
>
>
>
>
>
> *“Do all the good you can,By all the means you can,In all the ways you 
> can,In all the places you can,At all the times you can,To all the people 
> you can,As long as ever you can.” - John Wesley*
> -----------------------------------------
>
>    *From:* pankaj khairanar <panka...@gmail.com <javascript:>>
> *To:* excel-...@googlegroups.com <javascript:> 
> *Sent:* Tuesday, June 17, 2014 10:28 AM
> *Subject:* $$Excel-Macros$$ Want Excel formula to Omit saturday sunday!
>  
> Hi Expert,
> I want excel formula for below scenario.
> Date-9=result
> If result=saturday or sunday then omit saturday or sunday and consider 
> monday.
>
> Extample1
>
> 02/June/14 - 9=Saturday, May 24, 2014 
> Want to omit this saturday and sunday want result as Monday, May 26,2014
>  
> Extample2
>  
> 03/June/14 - 9=Sunday, May 25, 2014 
> Want to omit this sunday and want result as Monday, May 26,2014
>
> Regards,
> Pankaj
> -- 
> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
> https://www.facebook.com/discussexcel
>  
> FORUM RULES
>  
> 1) Use concise, accurate thread titles. Poor thread titles, like Please 
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice 
> will not get quick attention or may not be answered.
> 2) Don't post a question in the thread of another member.
> 3) Don't post questions regarding breaking or bypassing any security 
> measure.
> 4) Acknowledge the responses you receive, good or bad.
> 5) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>  
> NOTE : Don't ever post confidential data in a workbook. Forum owners and 
> members are not responsible for any loss.
> --- 
> You received this message because you are subscribed to the Google Groups 
> "MS EXCEL AND VBA MACROS" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to excel-macros...@googlegroups.com <javascript:>.
> To post to this group, send email to excel-...@googlegroups.com 
> <javascript:>.
> Visit this group at http://groups.google.com/group/excel-macros.
> For more options, visit https://groups.google.com/d/optout.
>
>
>  

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.

Reply via email to