Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
I hope someone can help with a solution to this problem. I don't know if a macro is required or it can be done in another way. Here is my worksheet: A B C D E F 1 1 2 3 4 5 2 D H E N K 3 Peter afs 1 x aft 4 David x fer 1 1 5 Gordon 1 1 fer fer fer Row 1 shows the date Row 2 shows a category The user input area is B3:F5 I want to filter the data and have them listed as shown below The output should be like this: "name - date - category - user input" The only cells that should not appear on the list are cells with the values "x" or "1" or blank cells After filtering the list should look like this: Peter 1-D-afs Peter-4-N-aft David-2-H-fer Gordon-3-E-fer Gordon-4-N-fer Gordon-5-K-fer Thank you for any suggestions. Kaj Pedersen --- Denne e-mail er fri for virus og malware fordi avast! Antivirus beskyttelse er aktiveret. http://www.avast.com |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Here is my worksheet:
A B C D E F 1 1 2 3 4 5 2 D H E N K 3 Peter afs 1 x aft 4 David x fer 1 1 5 Gordon 1 1 fer fer fer After filtering the list should look like this: Peter 1-D-afs Peter-4-N-aft David-2-H-fer Gordon-3-E-fer Gordon-4-N-fer Gordon-5-K-fer The only cells that should not appear on the list are cells with the values "x" or "1" or blank cells. Unfortunately, the data is in a format that's inconvenient for Excel's built-in filtering. One approach is to make an intermediate result that's more convenient. Here's one way. My example has: dates in B1:F1 categories in B2:F2 names in A3:A5 user input in B3:F5 intermediate result in J1:M15 In J1 put =INDEX(A:A,INT((ROW()-1)/5)+3) In K1 put =INDEX($B$1:$F$1,1,MOD(ROW()-1,5)+1) In L1 put =INDEX($B$2:$F$2,1,MOD(ROW()-1,5)+1) In M1, put =IF(INDEX(A:F,INT((ROW()-1)/5)+3,MOD(ROW()-1,5)+2)="","", INDEX(A:F,INT((ROW()-1)/5)+3,MOD(ROW()-1,5)+2)) In N1 put =J1&"-"&K1&"-"&L1&"-"&M1 This is the result column. Select J1:N1 and copy down to row 15. Finally, filter on column M to exclude "x" or "1" or blank cells. Hopefully, some variation of the above meets the need. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Filtering of data - autmatically based on data on other sheet | Excel Discussion (Misc queries) | |||
Data Filtering | Excel Programming | |||
Filtering data | Excel Programming | |||
Filtering Data | Excel Programming | |||
Help with Filtering data and matching two data sets? | Excel Programming |