View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Kamlu Kamlu is offline
external usenet poster
 
Posts: 8
Default Need a help of preparing excel macro

Hi

In the below data I want to run a kind of macro that will help me get
clearance or output in another column. Column A has invoice numbers with bill
no.s and column B has only bill numbers. In column O there is amount
relating to the bills in positive and negative. I want to use a macro or
formula that will get me outcome in the column as clearance by tallying up
the amounts to the bills. Please see example below

Point 1:
If a bill (column B) has an amount of 5 (column O) next to the column and
the same bill (column B) has a -5 (column O) next to it both in different
rows, the outcome in column Q for both of these amounts should come out as
clearance in both rows.

Column A Column B Column C Column O Column Q
Full Invoice No. Bill No. Invoice No.
Amt Output
GB14474406-523472291 523472291 GB14474406 3171.06 C
GB53656954-523472291 523472291 GB53656954 -3171.06 C
GB14474404-523472856 523472856 GB14474404 3174.11 C
GB53656915-523472856 523472856 GB53656915 -389.27
GB53656999-523472856 523472856 GB53656999 -3174.11 C
GB53657000-523472856 523472856 GB53657000 380.00

Point 2:
For the same data I want the clearance in the column where difference in
amount is less then 10. Please see below example.

Column A Column B Column C Column O Column Q
Full Invoice No. Bill No. Invoice No.
Amt Output
GB53656915-523472856 523472856 GB53656915 -389.27 C
GB53657000-523472856 523472856 GB53657000 380.00 C

Appreciate your help on the above request. Please let me know if you need
futher information.