S
sylphide
Hi
I nned to convert a Fortran code in VBA:
ER_ELIG = .false.
ERPOINTS = iage + vsvcb
IF ((IGRP.eq.1).and.(iage.ge.55).and.(vsvcb.ge.10))
IF ((IGRP.eq.2).and.(iage.ge.50))
ERF = 0.00
IF (ER_ELIG) THEN
IF (IGRP.eq.1) THEN
IF (ERPOINTS.ge.75) then
ERF = DIM ( 1. , .04*MIN(4,DIM(62,MAX(55,iage)))
ERF = DIM ( 1. , .0667*MIN(5,DIM(65,MAX(55,iage)))
IF (vsvcb.ge.25) ERF = 1.000
IF ((iage.ge.62).and.(ERPOINTS.ge.75)) ERF = 1.000
ELSE
ERF = DIM ( 1. , .018*MIN(2,DIM(62,MAX(50,iage)))
ENDIF
ENDIF
Anyone could help please?
Thanks in advance
I nned to convert a Fortran code in VBA:
ER_ELIG = .false.
ERPOINTS = iage + vsvcb
IF ((IGRP.eq.1).and.(iage.ge.55).and.(vsvcb.ge.10))
ER_ELIG = .true.
IF ((IGRP.eq.2).and.(iage.ge.50))
ER_ELIG = .true.
ERF = 0.00
IF (ER_ELIG) THEN
IF (IGRP.eq.1) THEN
IF (ERPOINTS.ge.75) then
ERF = DIM ( 1. , .04*MIN(4,DIM(62,MAX(55,iage)))
ELSE+ .03*MIN(3,DIM(58,MAX(55,iage))) )
ERF = DIM ( 1. , .0667*MIN(5,DIM(65,MAX(55,iage)))
ENDIF+ .0333*MIN(5,DIM(60,MAX(55,iage))) )
IF (vsvcb.ge.25) ERF = 1.000
IF ((iage.ge.62).and.(ERPOINTS.ge.75)) ERF = 1.000
ELSE
ERF = DIM ( 1. , .018*MIN(2,DIM(62,MAX(50,iage)))
IF (iage.ge.62) ERF = 1.000+ .036*MIN(5,DIM(60,MAX(50,iage)))
+ .052*MIN(5,DIM(55,MAX(50,iage))) )
ENDIF
ENDIF
Anyone could help please?
Thanks in advance