In the attached spreadsheet ( Sales Analysis Report), I would like to update column H value automatically by using below fields.



Sales:D column , Sales:H column , Payments Receieved:D column and Payments Receieved:H column
Can you please guide me how we can achieve this either through macro (VBA code) (or) we can do this in a simple formula as well.
I have highlighted all the cells which are required for this logic in color.
Thanks in advance for your time and appreciated your help.
Regards,
Narry
No VBA needed here, Narry.
Enter this formula in cell
H1of Customer Information tab:=SUMIF(Sales!D:D,D1,Sales!H:H)-SUMIF('Payments Recieved'!D:D,D1,'Payments Recieved'!H:H)Then drag down to fit the other rows.
You can easily google ‘vlookup’ or look in Excel Help to find out more about what it does.