Asking Function IF

hi… i have condition like this excel as below.

image

If Range From > 0 then click Range Of Values Else click List Of Values.

please advise, thanks.

@Felix_Gunawan

May I know what you want to perform after clicking that cell ?

Hi,

Can you try the following condition?

Double.Parse(row.Item("Range From").ToString)>0

Regards,

Still have Warning error…

Hi,

Can you share the error message?

Regards,

i’m just want to use condition IF with Range From > 0 then Click Range Of Values. Else then Click List of Values.
still confused in this IF .

Make your if condition something like this

Convert.ToInt32(row.Item(column_name).ToString)> 0 it should remove the errors @Felix_Gunawan

Yes Remove error, but when running the process, it still having issue like below.
image

Convert.ToDouble use this @Felix_Gunawan

Convert.ToDouble(row(“Range From”)) > 0

@Felix_Gunawan

Try below expression in IF activity.

                CDbl(row("Range From").ToString) > 0

the result still error
image

still error like below
image

this finally working, so i have to input zero in worksheet. then if condition working fine. Many Thanks!

Hi,

FYI, if you want to handle blank as 0 in the expression, the following condition will work.

row("Range From") isnot Nothing  AndAlso row("Range From") isnot System.DBNull.Value AndAlso (not String.IsNullOrEmpty(row("Range From").ToString())) AndAlso Convert.ToDouble(row("Range From")) > 0

Regards,

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.