DoskoiPanda
New Member
- Joined
- Nov 30, 2012
- Messages
- 2
Hi,
Original question posted to your excel magic trick 358 - Excel Magic Trick 358: Part 1: Return Multiple Items From One Lookup Value for Table w Formula - YouTube
"This is really cool. I have used this array formula for retrieving data from some very large databases. One thing I'd like to know is how you would construct the formula to still return values when using either one, or both of the criterias. For example, if you want to look at week 2 but see all bets, regardless of W or L and vice versa, if you want to see all weeks that had a W."
"Basically, I'd like to make a formula that says, if Criteria 1 is chosen but Criteria 2 is blank, just show Criteria 1 Matches. If Criteria 1 is blank and Criteria 2 is chosen, show Criteria 2 Matches. And of course, if both Criteria are chosen, then show Matches that match both Criteria."
I would like to improve my current index array formula which I am using to pull physician records based on criteria such as the name of their practice and last name and basically by any other field.
Here is a sample data set. (all of the names are fictional)
[TABLE="width: 713"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD]Data Set 1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Last[/TD]
[TD]First[/TD]
[TD]Specialty[/TD]
[TD]Group practice name[/TD]
[/TR]
[TR]
[TD]Adams[/TD]
[TD]Aaron[/TD]
[TD]Family Medicine[/TD]
[TD]Adamsville Clinic[/TD]
[/TR]
[TR]
[TD]Anderson[/TD]
[TD]Bob[/TD]
[TD]Psychiatry[/TD]
[TD]Anderson County Clinic[/TD]
[/TR]
[TR]
[TD]Anderson[/TD]
[TD]Christine[/TD]
[TD]Ophthalmology[/TD]
[TD]Memorial Hospital of Anderson[/TD]
[/TR]
[TR]
[TD]Bailey[/TD]
[TD]Denise[/TD]
[TD]Allergy & Immunology[/TD]
[TD]Bailey Clinic[/TD]
[/TR]
[TR]
[TD]Cross[/TD]
[TD]Eric[/TD]
[TD]Allied Health -
Cardiology[/TD]
[TD]Cross Cardiology & Associates[/TD]
[/TR]
[TR]
[TD]Davis[/TD]
[TD]Frank[/TD]
[TD]Family Medicine[/TD]
[TD]Davis County Family Medicine[/TD]
[/TR]
[TR]
[TD]Ellis[/TD]
[TD]George[/TD]
[TD]Geriatric[/TD]
[TD]Ellis County Senior Care[/TD]
[/TR]
[TR]
[TD]Ellis[/TD]
[TD]Hank[/TD]
[TD]Chiropractic[/TD]
[TD]St. Ellis Hospital[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Search For:[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Last[/TD]
[TD]First[/TD]
[TD]Specialty[/TD]
[TD]Group practice name[/TD]
[/TR]
[TR]
[TD]xx[/TD]
[TD]xx[/TD]
[TD]xx[/TD]
[TD]xx[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 2"]Display Results:[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Last[/TD]
[TD]First[/TD]
[TD]Specialty[/TD]
[TD]Group practice name[/TD]
[/TR]
[TR]
[TD]yy[/TD]
[TD]yy[/TD]
[TD]yy[/TD]
[TD]yy[/TD]
[/TR]
</tbody>[/TABLE]
I would like to be type in data to replace the "xx"s and have the array formulas where the "yy"s are so that the table will automatically updated with relevant data. For example, if I type "Ellis" under Last where the "xx" is, the resulting Display results for "yy" will show both doctors with the last name Ellis. Then, if I type in "Chiropractic" under Specialty "xx", it will only show the Doctor named Ellis, who is also a Chiropractic.
In a perfect world, I want to ultimately be able to search and specify my search with any of the fields.
I'd like to thank you for your interest in my problem and hope that I don't waste too much of your time on this.
Best regards
Original question posted to your excel magic trick 358 - Excel Magic Trick 358: Part 1: Return Multiple Items From One Lookup Value for Table w Formula - YouTube
"This is really cool. I have used this array formula for retrieving data from some very large databases. One thing I'd like to know is how you would construct the formula to still return values when using either one, or both of the criterias. For example, if you want to look at week 2 but see all bets, regardless of W or L and vice versa, if you want to see all weeks that had a W."
"Basically, I'd like to make a formula that says, if Criteria 1 is chosen but Criteria 2 is blank, just show Criteria 1 Matches. If Criteria 1 is blank and Criteria 2 is chosen, show Criteria 2 Matches. And of course, if both Criteria are chosen, then show Matches that match both Criteria."
I would like to improve my current index array formula which I am using to pull physician records based on criteria such as the name of their practice and last name and basically by any other field.
Here is a sample data set. (all of the names are fictional)
[TABLE="width: 713"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD]Data Set 1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Last[/TD]
[TD]First[/TD]
[TD]Specialty[/TD]
[TD]Group practice name[/TD]
[/TR]
[TR]
[TD]Adams[/TD]
[TD]Aaron[/TD]
[TD]Family Medicine[/TD]
[TD]Adamsville Clinic[/TD]
[/TR]
[TR]
[TD]Anderson[/TD]
[TD]Bob[/TD]
[TD]Psychiatry[/TD]
[TD]Anderson County Clinic[/TD]
[/TR]
[TR]
[TD]Anderson[/TD]
[TD]Christine[/TD]
[TD]Ophthalmology[/TD]
[TD]Memorial Hospital of Anderson[/TD]
[/TR]
[TR]
[TD]Bailey[/TD]
[TD]Denise[/TD]
[TD]Allergy & Immunology[/TD]
[TD]Bailey Clinic[/TD]
[/TR]
[TR]
[TD]Cross[/TD]
[TD]Eric[/TD]
[TD]Allied Health -
Cardiology[/TD]
[TD]Cross Cardiology & Associates[/TD]
[/TR]
[TR]
[TD]Davis[/TD]
[TD]Frank[/TD]
[TD]Family Medicine[/TD]
[TD]Davis County Family Medicine[/TD]
[/TR]
[TR]
[TD]Ellis[/TD]
[TD]George[/TD]
[TD]Geriatric[/TD]
[TD]Ellis County Senior Care[/TD]
[/TR]
[TR]
[TD]Ellis[/TD]
[TD]Hank[/TD]
[TD]Chiropractic[/TD]
[TD]St. Ellis Hospital[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Search For:[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Last[/TD]
[TD]First[/TD]
[TD]Specialty[/TD]
[TD]Group practice name[/TD]
[/TR]
[TR]
[TD]xx[/TD]
[TD]xx[/TD]
[TD]xx[/TD]
[TD]xx[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 2"]Display Results:[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Last[/TD]
[TD]First[/TD]
[TD]Specialty[/TD]
[TD]Group practice name[/TD]
[/TR]
[TR]
[TD]yy[/TD]
[TD]yy[/TD]
[TD]yy[/TD]
[TD]yy[/TD]
[/TR]
</tbody>[/TABLE]
I would like to be type in data to replace the "xx"s and have the array formulas where the "yy"s are so that the table will automatically updated with relevant data. For example, if I type "Ellis" under Last where the "xx" is, the resulting Display results for "yy" will show both doctors with the last name Ellis. Then, if I type in "Chiropractic" under Specialty "xx", it will only show the Doctor named Ellis, who is also a Chiropractic.
In a perfect world, I want to ultimately be able to search and specify my search with any of the fields.
I'd like to thank you for your interest in my problem and hope that I don't waste too much of your time on this.
Best regards