Thread: IF Statement
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Socko Socko is offline
external usenet poster
 
Posts: 28
Default IF Statement

First you may find the weekday as below, assuming cell a1 has a
reference...

=weekday(a1)

Then passing on if function, to find if weekday=5(i.e., Friday), if
yes then, + 4

=IF(WEEKDAY(A1)=5,A1+4,A1+2)

Finally, to format it back as date, you may use text function...

The final formula as follows

=TEXT(IF(WEEKDAY(A1)=5,A1+4,A1+2),"mm/dd/yyyy")

I hope this helps.

Selva V Pasupathy
For more on Excel, VBA, and other resources
Please visit: http://socko.wordpress.com