Shane
03-30-2007, 03:17 AM
I have a worksheet that contains the Debt and Credits entries for a particular business type. Please see the attachment for better understanding. As of Now we have 4 columns each in Debts and Credits segments. Which may increase or decrease in future depends upon the business requirements.
Now the issue is we need to compare all the Debts columns with Credits Columns. We have to compare both the segments on the basis of Ref_Num. Depending on that I need to generate a report. Now say if R001 under Debts has $1000 so under credits we need to compare all the values under RefNum , Amount, Date , Remark. If it does not found R001 in Credit side then check for more occurrence of Ref_Num (in credit side only) and if found then needs to sum up the entire occurrence on that particular Ref_Num. Now the sum of Ref_Num will compare with the Amount value of Ref_Num in Debts side. If the sum matches then leave the records move on next Ref_Num. in Debts side. In case if there is any mismatch in sum of Ref_Num of credits side and debts side then all the entries of that Ref Num will get copy into Sheet2.
Similarly in case if any Ref _Num of Debts side does not match with Credits side then the record also get copied into Sheet2. For instance in sample.xls R008 is found under Debts but not under Credits side.
Pls help.
Shane
Now the issue is we need to compare all the Debts columns with Credits Columns. We have to compare both the segments on the basis of Ref_Num. Depending on that I need to generate a report. Now say if R001 under Debts has $1000 so under credits we need to compare all the values under RefNum , Amount, Date , Remark. If it does not found R001 in Credit side then check for more occurrence of Ref_Num (in credit side only) and if found then needs to sum up the entire occurrence on that particular Ref_Num. Now the sum of Ref_Num will compare with the Amount value of Ref_Num in Debts side. If the sum matches then leave the records move on next Ref_Num. in Debts side. In case if there is any mismatch in sum of Ref_Num of credits side and debts side then all the entries of that Ref Num will get copy into Sheet2.
Similarly in case if any Ref _Num of Debts side does not match with Credits side then the record also get copied into Sheet2. For instance in sample.xls R008 is found under Debts but not under Credits side.
Pls help.
Shane