S
sdg8481
Hi,
I want to replace the following VBA code;
' guess 15-day date!
InBy_Box.Text = DateValue(Referral_Box.Text) + 21
Where 21 days are guessed from the referral date, with the following
equivlant formula;
=A2+IF(B$2=0,0,SIGN(B$2)*SMALL(IF((WEEKDAY(A2+SIGN(B$2)*(ROW(INDIRECT("1:"&ABS(B$2)*10))),2)<6)*ISNA(MATCH(A2+SIGN(B$2)*(ROW(INDIRECT("1:"&ABS(B$2)*10))),C$2:C$3,0)),ROW(INDIRECT("1:"&ABS(B$2)*10))),ABS(B$2)))
This Array formula is work around for the Workday function if no analysis
tool pak can be included, however i need to know how this should be
transcribed into VBA, so that upon entering the referral date in a form the
future date (workdays) automatically calculates. Please help i'm really stuck
and do not know much about this line of VBA.
Thanks In Advance
I want to replace the following VBA code;
' guess 15-day date!
InBy_Box.Text = DateValue(Referral_Box.Text) + 21
Where 21 days are guessed from the referral date, with the following
equivlant formula;
=A2+IF(B$2=0,0,SIGN(B$2)*SMALL(IF((WEEKDAY(A2+SIGN(B$2)*(ROW(INDIRECT("1:"&ABS(B$2)*10))),2)<6)*ISNA(MATCH(A2+SIGN(B$2)*(ROW(INDIRECT("1:"&ABS(B$2)*10))),C$2:C$3,0)),ROW(INDIRECT("1:"&ABS(B$2)*10))),ABS(B$2)))
This Array formula is work around for the Workday function if no analysis
tool pak can be included, however i need to know how this should be
transcribed into VBA, so that upon entering the referral date in a form the
future date (workdays) automatically calculates. Please help i'm really stuck
and do not know much about this line of VBA.
Thanks In Advance