'Is.Numeric' is not a member of 'String'

Hello. I need help with a small issue in my project. I am working with excel and a particular column where there is numeric and alpha numeric values. I have ‘IF’ function where I am trying to see if the value of that particular column is Numeric and then it goes to the next stage if the value of the condition is true. The same If function was working in a separate project but in my current project its giving me an error and I am not sure why. Can this be fixed and if not is there an alternative where I can get the same result for (ColumnResult).IsNumeric. Please see the screen shot below.

IsNumeric(“YourString”)

@Rahim_Bhatia

Please try

IsNumeric(variable)

You can as well use
IsNullOrEmpty(int.TryParse(value))
this will be null only thwn the provided value is not valid integer else will return the value

Cheers

Done with a qualified acces to the method, using a string:
grafik

in addition to:

we will pass a dummy argument with nothing when using TryParse:

Otherwise we can also check if a string match the expectations for a particular number parsing like:

grafik

And can also handle the Locals e.g. other region formattings:

Thanks for the solution Anil. I tried the first solution "IsNumeric(“Myvariable”) and that seems to remove the error.

I also tried the second solution you gave me but few things weren’t coming on the list automatically so I’ll stick with the first solution and test it out.

Thank you and have a great day! :slight_smile:

1 Like

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