Multiplying the value of each cell by a number

Hi All,

I want to multiply each cell values ( from D2) with 100. I have attached the excel sheet. I was trying with assign activity and Value= (Convert.ToInt32(row(“GTPC delete session (Success Ratio)”).ToString)*Convert.ToInt32(int_num.ToString)).ToString

But somehow it is not taking the name “GTPC delete session (Success Ratio)”. I have attached the excel sheet here. Can anyone help please?

Core Performance Report.xlsx (1.6 MB)

1 Like

I am getting this error:

Casting to Decimal rather than Int32 will solve your problem. I got rid of extra String casting too.

(Convert.ToDecimal(row("GTPC delete session (Success Ratio)")) * 100).ToString

In these situations, you might want to split your assignment to find out which part is in fault (I share your love for one-liners, I know, it’s hard).

2 Likes

Hi @Ananya_Ghosal

just a suggestion!

Put this first into a variable =Convert.ToInt32(row(“GTPC delete session (Success Ratio)”).ToString) and this Convert.ToInt32(int_num.ToString) its better to read and from that you can easily determine the problem. :smiley:

cheers :smiley:

Happy learning :smiley:

3 Likes

Thanks a ton :smiley:
I have a new challenge now. user is using a formula in excel for all the cells. Purpose is to convert the value into real time. He is using this formula: {(C2+76060)/86400+Date(1970,1,1)}
C2 is the cell number.
How can I implement this using UiPath? Thanks in advance!

Thanks a ton :smiley:
I have a new challenge now. user is using a formula in excel for all the cells. Purpose is to convert the value into real time. He is using this formula: {(C2+7 60 60)/86400+Date(1970,1,1)}
C2 is the cell number.
How can I implement this using UiPath? Thanks in advance!