Move value form last date to last date between two sheets and insert total row

Mussala

Board Regular
Joined
Sep 28, 2022
Messages
68
Office Version
  1. 2019
Platform
  1. Windows
Hello
I want move value in last cell for last duplicated date for column F from ENTER sheet to SH sheet in last cell for last duplicated date in column F .
in enter sheet will change the date so will move value based on the same date between two sheets and insert TOTAL row after last cell for last duplicated date and sum TOTAL for each date by last row to sum the whole dates .
so I put the formula how should be and the result how show in SH sheet . the macro should not insert TOTAL row repeatedly when every time run the macro , with considering when there is value in enter sheet should move to sh sheet even if has already inserted the row for that date .

DATE.xlsm
ABCDEF
1DATEITEMIMPORTEXPORTBALANCEREAL
215/06/2023ITFG-0012,000.002,000.00
315/06/2023ITFG-0022,200.001,000.001,200.00
415/06/2023ITFG-0032,400.002,000.00400.00
515/06/2023ITFG-0042,600.002,600.00
616/06/2023ITFG-0052,800.002,800.00
716/06/2023ITFG-0063,000.001,200.001,800.00
816/06/2023ITFG-0073,200.00200.003,000.00
916/06/2023ITFG-0083,400.00200.003,200.00
1017/06/2023ITFG-0093,600.00500.003,100.00
1118/06/2023ITFG-0103,800.003,800.00
1219/06/2023ITFG-0114,000.00500.003,500.00
1319/06/2023ITFG-0124,200.00600.003,600.00
1419/06/2023ITFG-0134,400.00700.003,700.00
1519/06/2023ITFG-0144,600.004,600.00
1619/06/2023ITFG-0154,800.004,800.00
1719/06/2023ITFG-0165,000.00100.004,900.00
1819/06/2023ITFG-0175,200.005,200.00
19TOTAL61,200.007,000.0054,200.00
sh
Cell Formulas
RangeFormula
E2:E19E2=C2-D2
C19:D19C19=SUM(C2:C18)


DATE.xlsm
ABCDEF
1DATEITEMIMPORTEXPORTBALANCEREAL
215/06/2023ITFG-0012,000.002,000.00
315/06/2023ITFG-0022,200.001,000.001,200.00
415/06/2023ITFG-0032,400.002,000.00400.00
515/06/2023ITFG-0042,600.002,600.002,000.00
6TOTAL9,200.003,000.006,200.00
enter
Cell Formulas
RangeFormula
E2:E6E2=C2-D2
C6:D6C6=SUM(C2:C5)



should be in SH sheet
DATE.xlsm
ABCDEF
1DATEITEMIMPORTEXPORTBALANCEREAL
215/06/2023ITFG-0012,000.002,000.00
315/06/2023ITFG-0022,200.001,000.001,200.00
415/06/2023ITFG-0032,400.002,000.00400.00
515/06/2023ITFG-0042,600.002,600.002,000.00
6TOTAL9,200.003,000.006,200.00
716/06/2023ITFG-0052,800.002,800.00
816/06/2023ITFG-0063,000.001,200.001,800.00
916/06/2023ITFG-0073,200.00200.003,000.00
1016/06/2023ITFG-0083,400.00200.003,200.00
11TOTAL12,400.001,600.0010,800.00
1217/06/2023ITFG-0093,600.00500.003,100.00
13TOTAL3,600.00500.003,100.00
1418/06/2023ITFG-0103,800.003,800.00
15TOTAL3,800.000.003,800.00
1619/06/2023ITFG-0114,000.00500.003,500.00
1719/06/2023ITFG-0124,200.00600.003,600.00
1819/06/2023ITFG-0134,400.00700.003,700.00
1919/06/2023ITFG-0144,600.004,600.00
2019/06/2023ITFG-0154,800.004,800.00
2119/06/2023ITFG-0165,000.00100.004,900.00
2219/06/2023ITFG-0175,200.005,200.00
23TOTAL32,200.001,900.0030,300.00
24TOTAL61,200.007,000.0054,200.00
result
Cell Formulas
RangeFormula
C11:D11,C6:D6C6=SUM(C2:C5)
C15:D15,C13:D13C13=SUM(C12)
E2:E24E2=C2-D2
C23:D23C23=SUM(C16:C22)
C24:D24C24=C6+C11+C13+C15+C23

also posted here
https://www.excelforum.com/excel-pr...ue-form-last-date-to-last-date-between-two-sh
thanks
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

Forum statistics

Threads
1,223,275
Messages
6,171,122
Members
452,381
Latest member
Nova88

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