Use Dropdown to search other tabs

SFCChase

Board Regular
Joined
Jun 25, 2013
Messages
110
Office Version
  1. 2016
Platform
  1. Windows
Is it possible to search across multiple tabs in a workbook based off a dropdown box?

I have the following "wrap-up" page with a dropdown in the cell below unit (cell A2). I have about 40 additional tabs (each dedicated to an employee). I would like to be able to select a unit in cell A2 and have the workbook search each tab and if the employees assigned unit matches, sum the hours scheduled/worked in cells C5:E31.

UNIT
PAY PERIODON CALL SCHEDULEDON CALL WORKEDTOTAL
TOFROM
09/24/2310/07/23000
10/08/2310/21/23000
10/22/2311/04/23000
11/05/2311/18/23000
11/19/2312/02/23000
12/03/2312/16/23000
12/17/2312/30/23000
12/31/2301/13/24000
01/14/2401/27/24000
01/28/2402/10/24000
02/11/2402/24/24000
02/25/2403/09/24000
03/10/2403/23/24000
03/24/2404/06/24000
04/07/2404/20/24000
04/21/2405/04/24000
05/05/2405/18/24000
05/19/2406/01/24000
06/02/2406/15/24000
06/16/2406/29/24000
06/30/2407/13/24000
07/14/2407/27/24000
07/28/2408/10/24000
08/11/2408/24/24000
08/25/2409/07/24000
09/08/2409/21/24000
09/22/2410/05/24000

I have been playing with LOOKUP and SUMIF formulas but can't get anything to work. Any help would be appreciated. I'm not very familiar with VBA or Macros, but willing to learn if somebody has suggestions.
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Here is a rough start. I just looked at your OFFICE version. You may not have all the functions, but I'm going to post anyway cause I worked on it.

As you can see, I culminated the data from 2 sheets into columns starting at J5 through M5. This could be done for many more sheets as long as they are grouped together. Now I can use typical functions like Sumifs to get the data from those columns. Notice that in each person's sheet I added the person's name in each row of the working dates.

Book2
ABCDEFGHIJKLM
1UNIT
2John
3PAY PERIODON CALL SCHEDULEDON CALL WORKEDRegularTOTAL
4TOFROMNameDatesOn CallRegular
59/24/202310/7/202387112199Pete9/24/202388
610/8/202310/21/20230240Pete9/25/202368
710/22/202311/4/2023000Pete9/26/202388
811/5/202311/18/2023000Pete9/27/202388
911/19/202312/2/2023000Pete9/28/202388
1012/3/202312/16/2023000Pete9/29/202398
1112/17/202312/30/2023000Pete9/30/202398
1212/31/20231/13/2024000Pete10/1/202398
131/14/20241/27/2024000Pete10/2/2023108
141/28/20242/10/2024000Pete10/3/2023108
152/11/20242/24/2024000Pete10/4/2023108
162/25/20243/9/2024000Pete10/5/202358
Sheet2
Cell Formulas
RangeFormula
C5C5=SUMIFS($L$5#,$J$5#,$A$2,$K$5#,">="&$A5,$K$5#,"<="&$B5)
D5:D16D5=SUMIFS($M$5#,$J$5#,$A$2,$K$5#,">="&$A5,$K$5#,"<="&$B5)
E5E5=SUM(C5:D5)
J5:M58J5=VSTACK(Pete:John!B5:B31)
C6:C16C6=SUMIFS($L$5#,$J$5#,A3,$K$5#,">="&A6,$K$5#,"<="&B6)
Dynamic array formulas.
Cells with Data Validation
CellAllowCriteria
A2ListPete,John


Book2
ABCDE
1
2
3
4NameDatesOn CallRegular
5Pete9/24/202388
6Pete9/25/202368
7Pete9/26/202388
8Pete9/27/202388
9Pete9/28/202388
10Pete9/29/202398
11Pete9/30/202398
12Pete10/1/202398
13Pete10/2/2023108
14Pete10/3/2023108
15Pete10/4/2023108
16Pete10/5/202358
17Pete10/6/202358
18Pete10/7/202358
19Pete10/8/202388
20Pete10/9/202388
21Pete10/10/202388
22
Pete
 
Upvote 1
Here is a rough start. I just looked at your OFFICE version. You may not have all the functions, but I'm going to post anyway cause I worked on it.

As you can see, I culminated the data from 2 sheets into columns starting at J5 through M5. This could be done for many more sheets as long as they are grouped together. Now I can use typical functions like Sumifs to get the data from those columns. Notice that in each person's sheet I added the person's name in each row of the working dates.

Book2
ABCDEFGHIJKLM
1UNIT
2John
3PAY PERIODON CALL SCHEDULEDON CALL WORKEDRegularTOTAL
4TOFROMNameDatesOn CallRegular
59/24/202310/7/202387112199Pete9/24/202388
610/8/202310/21/20230240Pete9/25/202368
710/22/202311/4/2023000Pete9/26/202388
811/5/202311/18/2023000Pete9/27/202388
911/19/202312/2/2023000Pete9/28/202388
1012/3/202312/16/2023000Pete9/29/202398
1112/17/202312/30/2023000Pete9/30/202398
1212/31/20231/13/2024000Pete10/1/202398
131/14/20241/27/2024000Pete10/2/2023108
141/28/20242/10/2024000Pete10/3/2023108
152/11/20242/24/2024000Pete10/4/2023108
162/25/20243/9/2024000Pete10/5/202358
Sheet2
Cell Formulas
RangeFormula
C5C5=SUMIFS($L$5#,$J$5#,$A$2,$K$5#,">="&$A5,$K$5#,"<="&$B5)
D5:D16D5=SUMIFS($M$5#,$J$5#,$A$2,$K$5#,">="&$A5,$K$5#,"<="&$B5)
E5E5=SUM(C5:D5)
J5:M58J5=VSTACK(Pete:John!B5:B31)
C6:C16C6=SUMIFS($L$5#,$J$5#,A3,$K$5#,">="&A6,$K$5#,"<="&B6)
Dynamic array formulas.
Cells with Data Validation
CellAllowCriteria
A2ListPete,John


Book2
ABCDE
1
2
3
4NameDatesOn CallRegular
5Pete9/24/202388
6Pete9/25/202368
7Pete9/26/202388
8Pete9/27/202388
9Pete9/28/202388
10Pete9/29/202398
11Pete9/30/202398
12Pete10/1/202398
13Pete10/2/2023108
14Pete10/3/2023108
15Pete10/4/2023108
16Pete10/5/202358
17Pete10/6/202358
18Pete10/7/202358
19Pete10/8/202388
20Pete10/9/202388
21Pete10/10/202388
22
Pete
Thanks Jeff....I'm having some issues viewing any data you put in for "John". Is there something missing from the picture?

Also....can you please explain what the # means in your equations or is that just a holder for me to input my specific cell references?
 
Upvote 0
Sorry, I didn't post the John sheet. Just duplicate the Pete sheet and change some of the hours for simulation

I'm hoping you have the version of Excel to run the functions I gave you.

# is used to reference array formulas. This saves time from having to specify a range that may change in size depending on how many rows your array formula is going to retrieve. In this case cell J6 has an array formula
 
Upvote 0
Sorry, I didn't post the John sheet. Just duplicate the Pete sheet and change some of the hours for simulation

I'm hoping you have the version of Excel to run the functions I gave you.

# is used to reference array formulas. This saves time from having to specify a range that may change in size depending on how many rows your array formula is going to retrieve. In this case cell J6 has an array formula
No worries. I ended up figuring it out.

My excel will allow me to use the VSTACK function, but it wouldn't let me use the # to close the array. I ended up having to type i the full ranges, but it ended up working out anyway. Thanks for the help!
 
Upvote 0

Forum statistics

Threads
1,223,867
Messages
6,175,077
Members
452,611
Latest member
bls2024

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