I have 2 types of insurance. Insurance A and Insurance B
There’s an insurance called “Combination (mixed of A and B)”. Example :
An insurance starting from 1/6/2020 - 1/6/2024 (1 June 2020 - 1 June 2024)
5 years of insurance
Year 1 (1/6/2020) : Ins A
Year 2 (1/6/2021) : Ins B
Year 3 (1/6/2022) : Ins B
Year 4 (1/6/2023 ): Ins A
Year 5 (1/6/2024 ): Ins B
The goal is I need to output into excel “Insurance is 2 months left” per period where insurance type is Ins A. So if it’s 1/6/2020 it will write to excel “Insurance is 2 months left”. If its 1/6/2021, it will NOT write anything to excel. Can any1 help with the if logic?
So far I manage to pass the value into dictionary but I’m stuck at the year checking of the robot.
step1 for each or for each row
step2 get your date in as per variable
step3 arrayvar=var.split("/"c).toarray()
step4 year=cint(arrayvar(2).tostring)-now.year
step4 month =cint(arrayvar(1).tostring)-now.month
step5 result = year +"year and “+ month+ " months left”