Complex Cell Formula
It seems that the date you want is two days earlier than the date in cell A1, except that if the result is on a weekend, it should be the Friday before the weekend.
You can use the WEEKDAY function to return a number representing the day of the week a date is (1=Sunday, 7=Saturday).
A simple way to get the date you want is
=IFS(WEEKDAY(A1-2)=1,A1-4,WEEKDAY(A1-2)=7,A1-3,TRUE,A1-2)
If your version of Excel doesn't have the IFS function, you can use nested IF functions:
=IF(WEEKDAY(A1-2)=1,A1-4,IF(WEEKDAY(A1-2)=7,A1-3,A1-2))
Consider:
=CHOOSE(WEEKDAY(A1),A1-2,A1-3,A1-4,A1-2,A1-2,A2-2,A1-2)
Because: