hi,

i scraping value from an application

a= 100

b= 10%

i need to do this a+a *10/100

how to do this on uipath

hi,

i scraping value from an application

a= 100

b= 10%

i need to do this a+a *10/100

how to do this on uipath

@ppr @William_Blech_Sister

a= 100 got it as scraped value

b = 10 % got it as scraped value

i need to calculate it as

100 * 10 /100

Hy @manojv02500,

Try this: CInt(a) * cint(strings.Replace(b,β%β,vbNullString)) /100

involve it ().toString to print in a text box, for example

Please let me know if it works

1 Like

Hy @manojv02500, what is the data type to range1? is it a number or string?

If it is a string wrap the text with ().toString

@manojv02500 this is shown in my screenshot above

covert string into int with CInt

do the calculation

bring the result to string if needed as string with toString

I think some of the replies here are missing the point that a percentage should be divided by 100 when using in math.

so if you have:

a = 100

b = 10%

Then you can do this:

```
CDbl(a) * (CDbl(b.ToString.Replace("%","")) / 100)
```

That would give you a decimal. If you need to round it, then check out this:

I used Double types so it can handle decimals.

Additionally, if b does not always have a percent, then you would need to use an IF to check if itβs a percentage before dividing by 100.

Regards.

1 Like

@William_Blech_Sister

Thanks i am getting correct answer now now i need to add the result to a

i.e a= 100

answer = 10

so a+ answer = 110

i am getting thus error

Hy @manojv02500,

Please set the data type to RangeLow to double

To print it in the message box type Range.tostring

It should work you are almost there

so all the other scrape value are string or to int32

You could set to string and then convert it to int

@William_Blech_Sister

Now i have two ranges i.e 95(lowrange) to 110 (HighRange)

how can i check if a number fall in-between or not