populate amounts for adjacent cell for each account name and add difference amount

Omar M

Board Regular
Joined
Jan 11, 2024
Messages
66
Office Version
  1. 2019
Platform
  1. Windows
Hello
here is data in COLLECTION sheet
ACCOUNTS DAILY (1).xlsm
ABCDEFG
1ITEMACCOUNT NAMEDEBIT TOTALCREDIT TOTALFIRST BALANCESDEBIT BALANCESCREDIT BALANCES
21BANK10,000.008,500.00
32SAFE100,000.0016,000.00
43PURCHASE50,000.00
54SELLING18,000.00
65CAPITAL1,000,000.0014,000.00
76SELLING RETURNING1,000.00
87PURCHASE RETURNING30,000.00
97CREDITOR500,000.0010,000.00
108 INVENTORY OF FIRST DURETION200,000.00100,000.00
119LAND120,000.00
1210BUILDING13,000.00
1311DEBTOR20,000.00
1412Discount allowed
1513Earned discount
1614 INVENTORY OF ENDINDG DURETION150,000.00
1715ELECT EXPENSES50,000.00
1816STATIONA EXPENSES 30,000.00
1917AD EXPENSES15,000.00
2018INSURE EXPENSES30,000.00
COLLECTION



here should show result in this sheet
ACCOUNTS DAILY (1).xlsm
ABCD
3DEBITACCOUNT NAMECREDITACCOUNT NAME
4PURCHASESELLING
5SELLING RETURNINGPURCHASE RETURNING
6 INVENTORY OF FIRST DURETION INVENTORY OF ENDINDG DURETION
7
8
9
SHOULD IN COLLECTION SHEET



then should match ACCOUNT NAME in column B with account name in column B for COLLECTION sheet and populate amount in column A for adjacent cell contains account name in column B by brings amount from COLLECTION in column F, and populate amount in column C for adjacent cell contains account name in column D by brings amount from COLLECTION in column G. and add difference amount (PROFIT) in column B if the TOTAL column C bigger than TOTAL column A after that add TOTAL word to sum columns A,C and copy amount for adjacent PROFIT cell to column C for adjacent cell (BALANCE) ,but add difference amount (LOSS ) in column C if the TOTAL column C smaller than TOTAL column A after that add TOTAL word to sum columns A,C and copy amount for adjacent LOSS cell to column A for adjacent cell (BALANCE)
the result should be
ACCOUNTS DAILY (1).xlsm
ABCD
3DEBITACCOUNT NAMECREDITACCOUNT NAME
450,000.00PURCHASE18,000.00SELLING
51,000.00SELLING RETURNING30,000.00PURCHASE RETURNING
6100,000.00 INVENTORY OF FIRST DURETION150,000.00 INVENTORY OF ENDINDG DURETION
747,000.00 PROFIT
8198,000.00TOTAL198,000.00
9BALANCE47,000.00
SHOULD IN COLLECTION SHEET
Cell Formulas
RangeFormula
C8C8=SUM(C4:C7)


I hope this clear and I whish DanteAmore help me again. :)
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Is this what you need:

varios 16ago2024.xlsm
ABCD
1
2
3DEBITACCOUNT NAMECREDITACCOUNT NAME
450,000.00PURCHASE18,000.00SELLING
51,000.00SELLING RETURNING30,000.00PURCHASE RETURNING
6100,000.00 INVENTORY OF FIRST DURETION150,000.00 INVENTORY OF ENDINDG DURETION
747,000.00PROFIT 
8198,000.00TOTAL198,000.00
9 BALANCE47,000.00
10
SHOULD
Cell Formulas
RangeFormula
B7B7=IF(SUM(C4:C6)>SUM(A4:A6),"PROFIT","LOSS")
A4:A6A4=VLOOKUP(B4,COLLECTION!B:F,5,0)
A7A7=IF(B7="PROFIT",SUM(C4:C6)-SUM(A4:A6),"")
A8,C8A8=SUM(A4:A7)
A9A9=C7
C4:C6C4=VLOOKUP(D4,COLLECTION!B:G,6,0)
C7C7=IF(B7="LOSS",SUM(A4:A6)-SUM(C4:C6),"")
C9C9=A7
 
Upvote 0
Solution
thank again
I would add words(PROFIT,LOSS,BALANCE) automatically because sometimes adds new accounts names in columns B,D then will change words(PROFIT,LOSS,BALANCE) in location (other meaning not always in the same location for rows).
note: when there is LOSS word then will be in A9=C7 , not C9(because TOTAL amounts for DEBIT bigger than TOTAL amounts for CREDIT and in this case will show amount difference in credit column and then will copy to column A for adjacent cell(BALANCE).
 
Upvote 0
I don't quite understand what you need, but if in your example you increase the debits so that they are greater than the credits, you will see that the word changes to "LOSS".
Try...
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,191
Members
452,616
Latest member
intern444

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top