Hi guys,
I am stuck into a following thing i have 3 amount where i need to calculate the sum of three amount and the answer should be zero i tried using loop but no sucessany suggestion would be appreciated
You are going to have to provide a more detailed description of what your setup is and what you are trying to do with it... what you have posted is not clear to me at all.Code:Do If lp = 0 Then amt = net_receipt_amt - Net_Charges_amt - Net_Income_amt ElseIf lp = 1 Then amt = net_receipt_amt + Net_Charges_amt - Net_Income_amt ElseIf lp = 2 Then amt = net_receipt_amt + Net_Charges_amt + Net_Income_amt ElseIf lp = 3 Then amt = -net_receipt_amt + Net_Charges_amt + Net_Income_amt ElseIf lp = 4 Then amt = -net_receipt_amt + Net_Charges_amt + Net_Income_amt ElseIf lp = 5 Then amt = -net_receipt_amt - Net_Charges_amt + Net_Income_amt ElseIf lp = 6 Then amt = -net_receipt_amt + Net_Charges_amt - Net_Income_amt End If If amt = 0 Then Exit Do lp = lp + 1 Loop


any suggestion would be appreciated
Reply With Quote
Bookmarks