If condition lessthan equal

how to use less than equal in if condition?
if%20lessthan

1 Like

<= buddy … like this
you were almost done buddy just small changes

Convert.ToInt32(row(“Inv_Quantity”).ToString.Trim) <= Convert.ToInt32(row1(“Quantity_PO”).ToString.Trim)

Strings cannot be compared with <= symbol buddy @priyankavivek
so we need to convert the string value to integer with the above expression and then we can compare buddy
Simple one step isn’t it…?

Cheers @priyankavivek

1 Like

You can only check the equal condition for strings. Please parse before using in if.

Please parse Inv_Quantity and Quantity_PO to Integer first and the use it in the condition.

inv_quantity = Int32.Parse(row("Inv_Quantity").ToString.Trim)
po_quantity = Int32.Parse(row("Quantity_PO").ToString.Trim)

Use the below if condition

If inv_quantity <= po_quantity Then

Regards,
Karthik Byggari

2 Likes

Did that work buddy @priyankavivek

1 Like

whats the use of using lessthan equal in if condition?can you please tell me

1 Like

less than equal operator usually compare two integer values or two datetime values or any values which are not string buddy @priyankavivek
like it will check whether LEFT HAND SIDE value is less than the RIGHT HAND SIDE value

Cheers @priyankavivek

1 Like

thank you so much!thank you for your reply!

1 Like

thank you much for your reply!:blush::slightly_smiling_face:

1 Like

Fantastic
Cheers buddy @priyankavivek
Keep going

have some queries will ask you…after some work…thank you so much for your patience reply for my every question.

1 Like

sure buddy @priyankavivek

i have an excel where in a column i hve empty cell,where i need to have if condition that if
row(“columnname”).to string is nothing,if the cell value is empty then i should print no,if there is value in cell then it should be yes in status column,any ideas on this? thank you so much!

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