VBA for data consolidation with ability to exclude some data.

RDGrist

New Member
Joined
May 21, 2020
Messages
2
Office Version
  1. 2016
  2. 2013
Platform
  1. Windows
  2. MacOS
Hi all, first post but long time browser.

I've got a workbook with 10 tabs which relate to a persons time spent on a task and a summary sheet with a consolidated view of the data.

So for example, each of the 10 tabs is names with the individual person and set up with:
  • A list of Projects in cells A2:A11
  • Months in the cells B1:M1
  • Data in the cells in number format to 2dp
  • a sum at the bottom of each column.
The summary tab is currently set up with the same template and in for example cell B2 which would be the equivalent of Project A & January I have the formula:

=SUM('nameone'!B2,'nametwo'!B2,'name three'!B2, etc..

This gives me the total of all hours and works because the worksheets are set int he same template.

However, what I now need to do is figure out a method to have the ability to exclude certain individuals from the summary. Originally I explored the option of having another tab with each name and a 'Yes' or 'No' option and then using a rather long winded =SUM(IF(nameone="No","","'nameone'!B2",IF( etc.. formula which looks very messy and complicated.

Now I am trying to figure out how to create a user form which will allow me to tick and untick individual names which will then include/exclude them from my summary template with the help of some sort of refresh button. I have limited ability when it comes to VBA - I've worked through an online tutorial before and used this site for tips on what I needed to know for simpler macros but as always keen to learn new ways of working.

It has also crossed my mind that this may be possible with the use of a pivot but I may need some advice on how to use ranges from multiple sheets as its not something I've done before.

Thank you all in advance.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Forum statistics

Threads
1,224,814
Messages
6,181,120
Members
453,021
Latest member
Justyna P

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