Morning,
I'm new to the Mr Excel forums but am in a bit of a loggerhead with a searchable/filterable database I am trying to set up. I have a rough understanding of VBA (mostly I record macros to see what the code looks like then edit it it suit my needs).
I'm trying to set up a a spreadsheet where a user can enter search terms to filter a list of data. I'm using Advanced Filter so I can use wildcards and operators (>, < etc) and copying the results to a "results" sheet.
My problem is that some of the data entries have multiple values associated with them and this makes the filters values act funny. I have come up with two ways of setting out the list so far but both have faults:
Option 1: Use Alt+Enter to separate multiple values ie:
<TBODY>
</TBODY>
I can filter this table for machines with a speed of 1000 using the advanced filter parameters:
<TBODY>
</TBODY>The user gives an input of "1000" and the spreadsheet automatically adds the wildcard * on the two rows below so that the advanced filter looks for Speed = 1000 OR *1000 OR 1000* (this collects the speeds 15001000 and 1000800) I would get this as a result:
<TBODY>
</TBODY>
The Problem: I can't think of a way to use operators like > or <. eg if I used <1400 I would only get Machine D as the filter thinks Machines A and B have speeds of 15,001,000 and 1,000,800 respectively. Applying the advanced filter with *<1400 OR <1400* doesn't return a result
Option 2: Cells without multiple values are merged (the cells containing "Machine A" or asset "2345" would be two rows merged for eg)
This means that if I were to filter with the parameters Speed: >=850 I would get:
<TBODY>
</TBODY>The Problem: Machine B has two speeds but only one matchs the filter criteria so only one of the merged rows is shown. Plus merged cells are going to get messy over a database with 5000+ assets...
This thread is already quite long but please let me know if I can provide more info to help
I'm new to the Mr Excel forums but am in a bit of a loggerhead with a searchable/filterable database I am trying to set up. I have a rough understanding of VBA (mostly I record macros to see what the code looks like then edit it it suit my needs).
I'm trying to set up a a spreadsheet where a user can enter search terms to filter a list of data. I'm using Advanced Filter so I can use wildcards and operators (>, < etc) and copying the results to a "results" sheet.
My problem is that some of the data entries have multiple values associated with them and this makes the filters values act funny. I have come up with two ways of setting out the list so far but both have faults:
Option 1: Use Alt+Enter to separate multiple values ie:
Description | Asset # | Site | Product Type | Speed | Comments |
Machine A | 1234 | A | 375 500 | 1500 1000 | xxxxxxxxxx |
Machine B | 2345 | A | 500 1000 | 1000 800 | xxxxxxxxx |
Machine C | 3456 | B | 1250 | 500 | xxxxxxxxxx |
Machine D | 7890 | B | 375 | 1000 | xxxxxxx |
<TBODY>
</TBODY>
I can filter this table for machines with a speed of 1000 using the advanced filter parameters:
Description | Asset # | Site | Product Type | Speed |
1000 | ||||
*1000 | ||||
1000* |
<TBODY>
</TBODY>
Description | Asset # | Site | Product Type | Speed | Comments |
Machine A | 1234 | A | 375 500 | 1500 1000 | xxxxxxxxxx |
Machine B | 2345 | A | 500 1000 | 1000 800 | xxxxxxxxx |
Machine D | 7890 | B | 375 | 1000 | xxxxxxx |
<TBODY>
</TBODY>
The Problem: I can't think of a way to use operators like > or <. eg if I used <1400 I would only get Machine D as the filter thinks Machines A and B have speeds of 15,001,000 and 1,000,800 respectively. Applying the advanced filter with *<1400 OR <1400* doesn't return a result
Option 2: Cells without multiple values are merged (the cells containing "Machine A" or asset "2345" would be two rows merged for eg)
This means that if I were to filter with the parameters Speed: >=850 I would get:
Description | Asset # | Site | Product Type | Speed | Comments |
Machine A | 1234 | A | 375 500 | 1500 1000 | xxxxxxxxxx |
Machine B | 2345 | A | 500 | 1000 | xxxxxxxxx |
<TBODY>
</TBODY>
This thread is already quite long but please let me know if I can provide more info to help