Filter or Index based on cell value and column header

2da

New Member
Joined
Oct 6, 2024
Messages
2
Office Version
  1. 365
Platform
  1. MacOS
Hello,
I want to filter/index values based on specific criteria I specify within a column, but also select a specific column within the range.

Example, Request Table. Users have requested multiple shifts (Column Headers) and I am putting a value R, RA, D, B, x. I want to filter users who are value R, RA, D, B on M-5:10 and so on. I was going to create a tab for each of the days. But copying and changing formulas for multiple tabs is not ideal. So looking to see if there is a formula I can use.

Thanks for your help.




Book3
ABCDEFGHIJKLMNO
1NameM - 5:10M - 10:40Tu - 5:10Tu - 10:40W - 5:10W - 10:40Th - 5:10Th - 10:40F - 5:10F - 10:40Sa - 5:10Sa - 10:40Su - 5:10Su - 10:40
2User 1RBxxxxxxxRR
3User 2RDxxxRRxxxR
4User 3xxRxxxxxxxxxB
5User 4RARRR
6User 5RRRBxR
7User 6RxxxRxBR
8User 7
9User 8
10User 9xxxRRxxxxxR
11User 10xRxBxxRR
12
13M - 5:10
14User 1R
15User 2R
16User 4RA
Data
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B2:O11Cell Valuecontains "D"textYES
B2:O11Cell Valuecontains "B"textNO
B2:O11Cell Valuecontains "RA"textNO
B2:O11Cell Valuecontains "R"textYES
B2:O11Cellcontains a blank value textNO
Cells with Data Validation
CellAllowCriteria
B2:O11Listx,R,RA,B,D
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Welcome to the MrExcel board!

I am not exactly clear what you are wanting as a result. Can you post an example or two (manually completed) of what result(s) you want and explain why that result?
 
Upvote 0
Hi Peter,

Here is the result i'm expecting. Based on the header, the data is to be returned as follows:

Book3
ABCDE
1M - 5:10M - 10:40Tu - 5:10
2User 1User 1User 4
3User 2User 2User 10
4User 4User 5
5User 6
Sheet3
 
Upvote 0
Thanks for the clarification. Try this formula in A2 of Sheet3 (adjusting the ranges if required) and then opy/paste (without further alteration) to C2, E2, ....

Excel Formula:
=LET(s,FILTER(Data!$B2:$O11,Data!$B1:$O1=A1),FILTER(Data!$A2:$A11,(s<>"x")*(s<>""),""))

2da.xlsm
ABCDEFG
1M - 5:10M - 10:40Tu - 5:10Tu - 10:40
2User 1User 1User 4User 3
3User 2User 2User 10User 5
4User 4User 5
5User 6
6
Sheet3
 
Upvote 0

Forum statistics

Threads
1,223,099
Messages
6,170,114
Members
452,302
Latest member
TaMere

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