Hello @RajKumar_DC , @Anil_G ,
Thank you guys for your timely response, but please apologies me for not providing the input,
Variables that i declared:
ConvertCashIn= cint(Row(“Cash In”).ToString)
ConvertCashOut= cint(Row(“Cash out”).ToString)
Input:-
Month |
Cash In |
Cash out |
Difference |
Status |
May-15 |
15 |
241 |
|
|
Jun-15 |
77 |
90 |
|
|
Jul-15 |
64 |
44 |
|
|
Aug-15 |
13K |
130 |
|
|
Sep-15 |
144 |
78 |
|
|
Oct-15 |
160 |
150K |
|
|
Nov-15 |
14O |
13 |
|
|
Dec-15 |
33 |
49 |
|
|
Jan-16 |
134 |
169 |
|
|
Feb-16 |
37K |
5K |
|
|
Expected output:
Month |
Cash In |
Cash out |
Difference |
Status |
May-15 |
15 |
241 |
-226 |
Correct |
Jun-15 |
77 |
90 |
-13 |
Correct |
Jul-15 |
64 |
44 |
20 |
Correct |
Aug-15 |
13K |
130 |
NA |
Cash In value is incorrect |
Sep-15 |
144 |
78 |
66 |
Correct |
Oct-15 |
160 |
150K |
NA |
Cash out value is incorrect |
Nov-15 |
14O |
13 |
NA |
Cash In value is incorrect |
Dec-15 |
33 |
49 |
-16 |
Correct |
Jan-16 |
134 |
169 |
-35 |
Correct |
Feb-16 |
37K |
5K |
NA |
Both the values are incorrect |
Question/Doubt:
if i use the below condition, i’m getting the expected output,
when i give the below in 1st IF condition.
Not IsNumeric(Row(“Cash In”).ToString) And Not IsNumeric(Row(“Cash out”).ToString)
and in 2nd IF condition as,
Int32.TryParse(Row(“Cash In”).ToString,0)
RATHER THAN, if i use the below condition which here is used the variable (ConvertCashIn) instead of column name directly (Row(“Cash In”).ToString),
not IsNumeric(ConvertCashIn) And Not IsNumeric(ConvertCashOut)
Int32.TryParse(ConvertCashIn.ToString, 0)
i’m getting either result as only cash out is incorrect,
Month |
Cash In |
Cash out |
Difference |
Status |
May-15 |
15 |
241 |
-226 |
Correct |
Jun-15 |
77 |
90 |
-13 |
Correct |
Jul-15 |
64 |
44 |
20 |
Correct |
Aug-15 |
13K |
130 |
NA |
Cash out value is incorrect |
Sep-15 |
144 |
78 |
66 |
Correct |
Oct-15 |
160 |
150K |
NA |
Cash out value is incorrect |
Nov-15 |
14O |
13 |
NA |
Cash out value is incorrect |
Dec-15 |
33 |
49 |
-16 |
Correct |
Jan-16 |
134 |
169 |
-35 |
Correct |
Feb-16 |
37K |
5K |
NA |
Cash out value is incorrect |
OR Cash In is incorrect though after changing the assign values
Month |
Cash In |
Cash out |
Difference |
Status |
May-15 |
15 |
241 |
-226 |
Correct |
Jun-15 |
77 |
90 |
-13 |
Correct |
Jul-15 |
64 |
44 |
20 |
Correct |
Aug-15 |
13K |
130 |
NA |
Cash In value is incorrect |
Sep-15 |
144 |
78 |
66 |
Correct |
Oct-15 |
160 |
150K |
NA |
Cash In value is incorrect |
Nov-15 |
14O |
13 |
NA |
Cash In value is incorrect |
Dec-15 |
33 |
49 |
-16 |
Correct |
Jan-16 |
134 |
169 |
-35 |
Correct |
Feb-16 |
37K |
5K |
NA |
Cash In value is incorrect |
Also, @RajKumar_DC , possible can you correct me the way i understand your code and mention first as “You Got it!” in next reply
If(IsNumeric(Row(“Cash In”).ToString),If(IsNumeric(Row(“Cash Out”).ToString),“Correct”,“Cash Out Value is Incorrect”),“Cash In Value is Incorrect”)
If(IsNumeric(Row(“Cash In”).ToString)–> is true then it takes “Correct”,“Cash Out Value is Incorrect”) and comes out of lf… then, next time if this fails, it goes to below condition
If(IsNumeric(Row(“Cash Out”).ToString)–>is true then it takes ,“Cash In Value is Incorrect”)
Thanks,