Tuesday, August 13, 2013

Google Spreadsheet Calculation for next weekday date

Question:


( by Im F )

Hi all:

Here's a question that can't make sure if there're methods to solve.
Say there're 3 blocks: A1,A2,A3
where I want put date in A1, and make A2 as the next coming Wednesday and make A3 as the next coming Saturday.
Don't find any proper way to complete the function (or I just too stupid to get it)
is there any command to derive the function or some formula to complete this function?
regards and I'll keep searching methods

Solution:

Have a look at the following screenshot of my Spreadsheet:



I have the following Date in Cell A1:
8/12/2013

I have the following formula in Cell A2:
=if( WEEKDAY(A1;1)<4 ; A1-WEEKDAY(A1;1)+4 ; A1+7-mod(WEEKDAY(A1;1);4) )

I have the following formula in Cell A3:
=if( WEEKDAY(A1;1)<7 ; A1-WEEKDAY(A1;1)+7 ; A1+7-mod(WEEKDAY(A1;1);7) )


I hope the above solution will help you, and if you need more help then please do comment below on this blog itself, I will try to help you out.

I also take up private and confidential projects:
If this blog post was helpful to you, and if you think you want to help me too and make my this blog survive then please donate here: http://igoogledrive.blogspot.com/2012/09/donate.html 

Thanks,

No comments:

Post a Comment