how insert and delete rows based on two cells values

abdelfattah

Well-known Member
Joined
May 3, 2019
Messages
1,429
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
hello
i need help from experts . what I want add a new rows based on two cells L2,M2 .L2=NAME , M2= ROWS NUMBERS so if I write the name and the rows numbers . it should look at to COL C to match the name and insert the rows based on L2,M2 , and if the L2,M2 are empty then should delete all of empty rows for all names and if the L2= empty and the M2 is rows numbers then insert rows for all names .
note: it should insert row with the same borders and formulas
this the orginal data
MATCH.xlsm
ABCDEFGHIJKLMNO
1NAMEDEBITCREDITBALANCEnamerow
21,000.00200.00800.00
3ITEMDATENAMEINVOICE NONOTEWAY OF PAID DEBITCREDITBALANCE
418/7/2021ALI1INV-1000NO PAID-10001,000.00
528/10/2021ALI1INV-1000PAIDCASH200.00800.00
6
7
8NAMEDEBITCREDITBALANCE
93,200.00100.003,100.00
10ITEMDATENAMEINVOICE NONOTEWAY OF PAID DEBITCREDITBALANCE
1118/8/2021ALI2INV-1001NO PAID-20002,000.00
1228/11/2021ALI2INV-1001PAIDCASH100.001,900.00
1338/13/2021ALI2INV-1003NO PAID-12003,100.00
14
15NAMEDEBITCREDITBALANCE
163,800.001,000.002,800.00
17ITEMDATENAMEINVOICE NONOTEWAY OF PAID DEBITCREDITBALANCE
1817/16/2021ALI3INV-1002PAIDCASH3000500.002,500.00
1927/16/2021ALI3INV-1002PAIDBANK500.002,000.00
2037/16/2021ALI3INV-1004NO PAID-8002,800.00
result
Cell Formulas
RangeFormula
B2:C2B2=SUM(G4:G5)
D2,I18,D16,I11,D9,I4D2=B2-C2
I5,I19:I20,I12:I13I5=I4+G5-H5
B16:C16,B9:C9B9=SUM(G11:G13)
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Forum statistics

Threads
1,214,929
Messages
6,122,315
Members
449,081
Latest member
tanurai

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