Need a Macro

Sufiyan97

Well-known Member
Joined
Apr 12, 2019
Messages
1,538
Office Version
  1. 365
  2. 2013
Platform
  1. Windows
Is it possible?
I need a macro to fill data in different tabs of a worksheet

In below Input sheet I will input Investment name and all other info. like shown below, and then I will delete it from Input tab, but it should remain on Investment tab

Green Banana Investment Summary.xlsx
ABCDEFGHIJ
1Select InvestmentDateAmountPurposeTransaction TypeROIAnnual ROIAnnual ReceiptsNotesNotes
2Hillside West 110008/13/2015$ 100,000.00Check
3Hillside West 110002/13/2017$ 2,967.19Deposit2.97%
4Hillside West 110005/09/2017$ 2,393.13Deposit2.39%
5Hillside West 110008/10/2017$ 1,618.75Deposit1.62%
6Hillside West 110011/08/2017$ 2,482.27Deposit2.48%9.46%$ 9,461.34
Input
Cell Formulas
RangeFormula
C3C3=2967.19
F3:F6F3=+C3/$C$2
G6G6=SUM(F3:F6)
H6H6=SUM(C3:C6)



In column A when I put Investment name and all other info it should copied to the that investment tab



Below is an investment tab macro should find last filled row and paste data to next blank row.

Green Banana Investment Summary.xlsx
ABCDEFGH
3DateAmountPurposeTransaction TypeROIAnnual ROIAnnual ReceiptsNotes
408/13/2015$ 100,000.00Check
502/13/2017$ 2,967.19Deposit2.97%
605/09/2017$ 2,393.13Deposit2.39%
708/10/2017$ 1,618.75Deposit1.62%
811/08/2017$ 2,482.27Deposit2.48%9.46%$ 9,461.34
902/06/2018$ 2,316.79Deposit2.32%
1005/08/2018$ 2,231.25Deposit2.23%
1108/01/2018$ 3,756.50Deposit3.76%
1210/31/2018$ 2,813.24Deposit2.81%11.12%$ 11,117.78
1301/29/2019$ 1,334.38Deposit1.33%
1404/11/2019$ 55,485.51Deposit55.49%
1504/29/2019$ 2,978.72Deposit2.98%
1607/22/2019$ 3,281.25Deposit3.28%
1711/06/2019$ 2,482.27Deposit2.48%65.56%$ 65,562.13
1802/13/2020$ 1,654.85Deposit1.65%
1907/24/2020$ 4,856.25Deposit4.86%
2010/21/2020$ 2,978.72Deposit2.98%9.49%$ 9,489.82
2110/22/2020$ 2.00220.00%2.00%2
Hillside West 1100
Cell Formulas
RangeFormula
B5B5=2967.19
F8,F12F8=SUM(E5:E8)
G8,G12G8=SUM(B5:B8)
F17F17=SUM(E13:E17)
G17G17=SUM(B13:B17)
F20F20=SUM(E18:E20)
G20G20=SUM(B18:B20)
E5:E21E5=+B5/$B$4



Below is another Investment tab

Green Banana Investment Summary.xlsx
ABCDEFGH
3DateAmountPurposeTransaction TypeROIAnnual ROIAnnual ReciptsNotes
412/31/2015150,000.00Journal EntryInvestment made via partners personal accounts ($50K each)
502/13/20175,592.98Deposit3.73%
605/09/20175,592.98Deposit3.73%
708/02/20175,066.83Deposit3.38%
808/28/2017139,740.94Deposit93.16%
911/08/20176,440.40Deposit4.29%108.29%$ 162,434.13
1002/06/20184,412.53Deposit2.94%
1104/27/20182,568.52Deposit1.71%
1207/30/20182,001.05Deposit1.33%
1310/31/20181,756.23Deposit1.17%7.16%$ 10,738.33
1401/29/20192,118.94Deposit1.41%
1505/08/20191,772.31Deposit1.18%
1607/26/20191,772.31Deposit1.18%
1710/24/20191,883.08Deposit1.26%5.03%$ 7,546.64
1802/13/20202,603.08Deposit1.74%
1906/12/20202,215.38Deposit1.48%
2009/08/20201,550.77Deposit1.03%
2110/29/20201,107.69Deposit0.74%4.98%$ 7,476.92
2210/29/20201,107.69Deposit0.74%3.99%$ 5,981.53
2310/29/20201.00111.00%1.00%$ 1.00
2410/30/202020.00220.01%2.00%$ 2.00
2510/31/202050.0055580.03%59.00%$ 60.0061
Hallmark West 1101
Cell Formulas
RangeFormula
F9F9=SUM(E5:E9)
G9G9=SUM(B5:B9)
F13,F21:F22,F17F13=SUM(E10:E13)
G13,G21:G22,G17G13=SUM(B10:B13)
E24:E25,E5:E22E5=+B5/$B$4
 

Attachments

  • Capture.PNG
    Capture.PNG
    3.2 KB · Views: 7

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Keep all your data on sheet INPUT. Format your data as a table (Format as Table).
Make on the sheets with a SELECT INVESTMENT a pivot table.
When there is new data added on the sheet INPUT you can refresh all pivot tables in once.

It is also possible to make from one pivot table all the other sheets.
In the pivot table you place SELECT INVESTMENT in the section FILTERS.
Now you can create sheets for every SELECT INVESTMENT with the option: Show Report Filter Pages
 
Upvote 0
Solution
Keep all your data on sheet INPUT. Format your data as a table (Format as Table).
Make on the sheets with a SELECT INVESTMENT a pivot table.
When there is new data added on the sheet INPUT you can refresh all pivot tables in once.

It is also possible to make from one pivot table all the other sheets.
In the pivot table you place SELECT INVESTMENT in the section FILTERS.
Now you can create sheets for every SELECT INVESTMENT with the option: Show Report Filter Pages
Thank you very much mart
I did not think of pivot table earlier.
 
Upvote 0
Hello Mart,

I am facing an issue in show report filter pages in pivot table,

when I add new record in input sheet (New Investment) and then again when I apply show report filter pages it created duplicates of all investment tabs, I want only new investment added as new tab and not all repeated which are already there.

In below screenshot I have added new Investment PG Portfolio 1103.

1611933800372.png
 
Upvote 0
For method 2 you have to delete all the sheets first.
For method 1 you can refresh with one click if your table is formatted as table!
 
Upvote 0

Forum statistics

Threads
1,214,520
Messages
6,120,007
Members
448,935
Latest member
ijat

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