Countif based on name across multiple closed files

qamex

New Member
Joined
Apr 16, 2018
Messages
5
Hi team,

I've been searching for weeks on how to complete this task but I can not even get a starting point. All I have managed to do is turn off certain aspects of excel to make the coding run more efficiently.

I cant write my own code but I've been able to understand what I find online until now. While I would like a solution. If it could be written with explanations to each section so I can learn to use the code again or even just explain the solution. I would be very grateful.

The Problem
I have a folder of files.
Each file has multiple tabs named for a person. First and last name. E.g. John Smith. These are dynamic but are limited to 10 people.
In each worksheet. There are 2 specific cell values I want to target, Their name and if a certain cell has an "x" in it.
The solution I want.
I want to create a Master sheet that has a list of these names.
I want to push a button.
I want to have a dialog box to open, which I can then navigate to the specific folder and select the specific files.
It should loop through all the files I select, look in cell G31, if it finds an "x" look in cell D6 (which contain the person name) Then use the name as a reference to add a total next to their name on the master sheet. Like a countif.
So if across 3 workbooks there are 4 instances for John Smith that have an "x" in G31 it should count those and add them to his tally. Counting up until all sheets are read through.

I would consider myself an amateur at this. Explanations are highly regarded.

Look forward to your help.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
i would submit to you to utilize power query. depending on your excel version either download the addin (or in later versions (i think from 2013 on) already available directly). Generally you are asking for a lot of small steps, but there is plenty of material eg on youtube to find your perfect fit solution.
 
Upvote 0

Forum statistics

Threads
1,216,225
Messages
6,129,596
Members
449,520
Latest member
TBFrieds

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