add missed rows and split some rows based on two items & invert amounts

Abdo

Board Regular
Joined
May 16, 2022
Messages
201
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
Hello
I have data in OUT CAS sheet depends on data in others sheets .
I need macro to find missed data are existed in others sheets but they are not existed in OUT CAS sheet with invert amounts for some items . if amount for CASH PP is CREDIT then should invert to become DEBIT as result show in OUT CAS sheet ,if amount for CASH SS is DEBIT then should invert to become CREDIT as result show in OUT CAS sheet, if amount for PUR PAID is credit then should split into two rows first the amount will be DEBIT with change word to CASH , and second will be as original data as I highlighted by red for this case as to PUR PURCHASE,EXPRR should keep as in original data so no changes for inverting amounts .
so if there are no data in OUT CAS sheet totally , then should brings all of data across sheets but should not repeat data have already copied when every time run the macro.
last thing I will add new sheets and could contain 3500 rows for each sheet .
aqq.xlsm
ABCD
1DATEACCOUNT REFDEBITCREDIT
201/04/2023PUR PURCHASE INV 00001120000
302/04/2023PUR PURCHASE INV 00001220000
403/04/2023PUR PURCHASE INV 00001320000
504/04/2023PUR PURCHASE INV 00001420000
605/04/2023PUR PURCHASE INV 00001520000
706/04/2023CASH PP 90001000
807/04/2023CASH SS 90012000
908/04/2023CASH PP 90021200
1009/04/2023CASH SS 90031200
1110/04/2023CASH SS 90041300
1211/04/2023CASH SS 90051400
1312/04/2023PUR PURCHASE INV 0000201000
1413/04/2023PUR PURCHASE INV 0000212000
1514/04/2023PUR PURCHASE INV 0000221200
1615/04/2023PUR PURCHASE INV 0000231200
1716/04/2023PUR PURCHASE INV 0000241300
1817/04/2023PUR PURCHASE INV 0000252000
CMSN


aqq.xlsm
ABCD
1DATEACCOUNT REFDEBITCREDIT
201/05/2023PUR PAID INV 0000261200
302/05/2023PUR PURCHASE INV 0000271600
403/05/2023PUR PURCHASE INV 000028800
504/05/2023PUR PURCHASE INV 000029900
605/05/2023PUR PURCHASE INV 0000302345
706/05/2023CASH PP 90101000
807/05/2023CASH SS 90112000
908/05/2023CASH SS 90122000
1009/05/2023CASH SS 90131200
1110/05/2023CASH SS 90141300
1211/05/2023CASH SS 90151400
1312/05/2023PUR PURCHASE INV 0000311000
1413/05/2023PUR PAID INV 0000326000
1514/05/2023PUR PURCHASE INV 0000331200
1615/05/2023PUR PURCHASE INV 0000341200
1716/05/2023PUR PURCHASE INV 0000351300
1817/05/2023PUR PAID INV 0000367000
CSTR


aqq.xlsm
ABCD
1DATEACCOUNT REFDEBITCREDIT
201/04/2023EXPRR INV EX0091200
302/04/2023EXPRR INV EX0101200
403/04/2023EXPRR INV EX0111000
504/04/2023EXPRR INV EX012123
605/04/2023EXPRR INV EX013122
7
8
9
10
11
EXPRO

aqq.xlsm
ABCD
1DATEACCOUNT REFDEBITCREDIT
212/04/2023PUR PURCHASE INV 0000201,000.00
314/04/2023PUR PURCHASE INV 0000221,200.00
415/04/2023PUR PURCHASE INV 0000231,200.00
516/04/2023PUR PURCHASE INV 0000241,300.00
604/05/2023PUR PURCHASE INV 000029900
705/05/2023PUR PURCHASE INV 0000302345
OUT CAS




what i want
aqq.xlsm
ABCD
1DATEACCOUNT REFDEBITCREDIT
201/04/2023PUR PURCHASE INV 00001120,000.00
302/04/2023PUR PURCHASE INV 00001220,000.00
403/04/2023PUR PURCHASE INV 00001320,000.00
504/04/2023PUR PURCHASE INV 00001420,000.00
605/04/2023PUR PURCHASE INV 00001520,000.00
706/04/2023CASH PP 90001,000.00
807/04/2023CASH SS 90012,000.00
908/04/2023CASH PP 90021,200.00
1009/04/2023CASH SS 90031,200.00
1110/04/2023CASH SS 90041,300.00
1211/04/2023CASH SS 90051,400.00
1312/04/2023PUR PURCHASE INV 0000201,000.00
1413/04/2023PUR PURCHASE INV 0000212,000.00
1514/04/2023PUR PURCHASE INV 0000221,200.00
1615/04/2023PUR PURCHASE INV 0000231,200.00
1716/04/2023PUR PURCHASE INV 0000241,300.00
1817/04/2023PUR PURCHASE INV 0000252,000.00
1901/05/2023CASH1,200.00
2001/05/2023PUR PAID INV 0000261,200.00
2102/05/2023PUR PURCHASE INV 0000271,600.00
2203/05/2023PUR PURCHASE INV 000028800.00
2304/05/2023PUR PURCHASE INV 000029900.00
2405/05/2023PUR PURCHASE INV 0000302,345.00
2506/05/2023CASH PP 90101,000.00
2607/05/2023CASH SS 90112,000.00
2708/05/2023CASH SS 90122,000.00
2809/05/2023CASH SS 90131,200.00
2910/05/2023CASH SS 90141,300.00
3011/05/2023CASH SS 90151,400.00
3112/05/2023PUR PURCHASE INV 0000311,000.00
3213/05/2023CASH6,000.00
3313/05/2023PUR PAID INV 0000326,000.00
3414/05/2023PUR PURCHASE INV 0000331,200.00
3515/05/2023PUR PURCHASE INV 0000341,200.00
3616/05/2023PUR PURCHASE INV 0000351,300.00
3717/05/2023CASH7,000.00
3817/05/2023PUR PAID INV 0000367,000.00
3901/04/2023EXPRR INV EX0091,200.00
4002/04/2023EXPRR INV EX0101,200.00
4103/04/2023EXPRR INV EX0111,000.00
4204/04/2023EXPRR INV EX012123.00
4305/04/2023EXPRR INV EX013122.00
OUT CAS



thanks
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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