Percentage calculationnn

Good day, can you please assist me here. There is an amount that is dynamic (depending on what I extract from the excel file), this amount needs to be exactly 20%, I have already calculated this:


The condition needs to be - if the amount is less than or greater than 20% then notify.

Here is it: please assist on the if condition here,if it’s correct based on what is described above.

@Anelisa_Bolosha1

You are almost correct instead of AND use OR operator
Threshold < 0.20 Or Threshold > 0.20 OR
You can just use Threshold <> 0.20

Let me know if this works

Happy Automation

@Anelisa_Bolosha1

20% of what?

if the value you are extracting is the premium then we need to calculate the 20% of some x number then that number should be equal to premium I believe

so what you need to do is premium.Equals(x * (20/100))

this will ensure the calculated premium from orginal value x is equal to the premium from excel

cheers

As per my understanding Pls use like :slight_smile:

ActualAmount < Threshold Or ActualAmount > Threshold

Change your var. name accordingly…

Happy Automation

This would be the correct process, the amount paid, is less than 20% of the premium or more than 20%..

amount paid=premium - (premium * 20%) OR

amount paid = premium + (premium * 20%)

@Anelisa_Bolosha1

then instead of equals use less than and greater than respectively

but as per description looks like you need to explude 20% to 80%

cheers

So,
if amount paid<(premium * (20/100)) or amount paid>(premium * (20/100))

@Anelisa_Bolosha1

looks liek premium is string so use cdbl(premium)

Also condition must be TA < CDL(P)*0.2 OR TA>CDBL(P)*1.2

cheers