Create a table with sum of cell of multiple sheets by using VBA

Christina Christina

New Member
Joined
Sep 1, 2021
Messages
1
Office Version
  1. 2007
Platform
  1. Windows
Greetings to all, I need help.

How do I create a table with the sum of each sheet cell from sheet ("Ali") to sheet ("20") and devide by sheet ("outcome").Cell ("B2") value by using VBA?
For example in the function, the first cell will be =SUM('Ali:20'!E5/$B$2) , then second cell is SUM('Ali:20'!F5/$B$2) etc.

Please be note that the table size is flexible base on the input of sheet( "strategies input") cell D2.
Which mean if the cell D2 is 8 then the table will be 8*8, if the cell D2 is 20 then the table will be 20*20.
Thanks in advance.

Sheet Ali.jpeg
Sheet Abu.jpeg
Example of the outcome
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Forum statistics

Threads
1,214,827
Messages
6,121,818
Members
449,049
Latest member
cybersurfer5000

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