Wildcard on multiple values

erodriguez1214

New Member
Joined
Mar 9, 2009
Messages
8
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 11"><meta name="Originator" content="Microsoft Word 11"><link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CERODRI%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:PunctuationKerning/> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--><style> <!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} span.EmailStyle15 {mso-style-type:personal; mso-style-noshow:yes; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt; font-family:Arial; mso-ascii-font-family:Arial; mso-hansi-font-family:Arial; mso-bidi-font-family:Arial; color:windowtext;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]--> I’ve come to the experts because I’m not one!! Here’s what I’m trying to do: <o:p></o:p>
<o:p> </o:p>
I need some kind of wildcard that can look at several values in one cell and populate the desired answer in another. <o:p></o:p>
<o:p> </o:p>
Example: Zip code 43601 is in column A. In column B is the district. Column C has the zip code range, with multiple values (such as - 410; 434-436; 450-455; 458; 459; 470). I need it to return the value "Cincinnati" from column B.



Any help would be greatly appreciated!!!!!!!!!

<table x:str="" style="border-collapse: collapse; width: 188pt;" width="250" border="0" cellpadding="0" cellspacing="0"><col style="width: 188pt;" width="250"><tr style="height: 12.75pt;" height="17"> <td class="xl24" style="height: 12.75pt; width: 188pt;" width="250" height="17">
</td> </tr></table>





<table x:str="" style="border-collapse: collapse; width: 413px; height: 211px;" border="0" cellpadding="0" cellspacing="0"><col style="width: 53pt;" width="70"> <col style="width: 9pt;" width="12"> <col style="width: 98pt;" width="130"> <col style="width: 188pt;" width="250"> <tbody><tr style="height: 12.75pt;" height="17"> <td class="xl23" style="height: 12.75pt; width: 53pt;" width="70" height="17">
</td> <td style="width: 9pt;" width="12">
</td> <td class="xl22" style="width: 98pt;" width="130">
</td> <td class="xl22" style="border-left: medium none; width: 188pt;" width="250">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl23" style="border-top: medium none; height: 12.75pt;" x:num="" height="17">
</td> <td>
</td> <td class="xl22" style="border-top: medium none;">
</td> <td class="xl22" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl23" style="border-top: medium none; height: 12.75pt;" x:num="" height="17">
</td> <td>
</td> <td class="xl22" style="border-top: medium none;">
</td> <td class="xl22" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl23" style="border-top: medium none; height: 12.75pt;" x:num="" height="17">
</td> <td>
</td> <td class="xl22" style="border-top: medium none;">
</td> <td class="xl22" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl23" style="border-top: medium none; height: 12.75pt;" x:num="" height="17">
</td> <td>
</td> <td class="xl22" style="border-top: medium none;">
</td> <td class="xl22" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="height: 12.75pt;" height="17">
</td> <td>
</td> <td class="xl22" style="border-top: medium none;">
</td> <td class="xl22" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="height: 12.75pt;" height="17">
</td> <td>
</td> <td class="xl22" style="border-top: medium none;">
</td> <td class="xl22" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="height: 12.75pt;" height="17">
</td> <td>
</td> <td class="xl22" style="border-top: medium none;">
</td> <td class="xl22" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="height: 12.75pt;" height="17">
</td> <td>
</td> <td class="xl22" style="border-top: medium none;">
</td> <td class="xl22" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="height: 12.75pt;" height="17">
</td> <td>
</td> <td class="xl22" style="border-top: medium none;">
</td> <td class="xl22" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="height: 12.75pt;" height="17">
</td> <td>
</td> <td class="xl22" style="border-top: medium none;">
</td> <td class="xl22" style="border-top: medium none; border-left: medium none;">
</td> </tr> </tbody></table>
<o:p></o:p>
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

ColinKJ

Well-known Member
Joined
Jan 27, 2009
Messages
983
You may well need to explain it a little better.

It would also be helpful if you could paste an example from your sheet

ColinKJ
 
Upvote 0

erodriguez1214

New Member
Joined
Mar 9, 2009
Messages
8
Thanks for the response ColinKJ. Hopefully I can explain better. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
<o:p></o:p>
On Sheet1 I have a list of zip codes. <o:p></o:p>
<o:p></o:p>
On Sheet2, column A are districts, column B are zip code ranges <o:p></o:p>
<o:p></o:p>
Example: <o:p></o:p>
<o:p></o:p>

<o:p></o:p>
<o:p></o:p>
<TABLE style="WIDTH: 210pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=279 border=0 x:str><COLGROUP><COL style="WIDTH: 100pt; mso-width-source: userset; mso-width-alt: 4864" width=133><COL style="WIDTH: 110pt; mso-width-source: userset; mso-width-alt: 5339" width=146><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD class=xl22 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 100pt; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: yellow" width=133 height=17>District</TD><TD class=xl22 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: windowtext; WIDTH: 110pt; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: yellow" width=146>Zip Code Range</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl23 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17>Baltimore</TD><TD class=xl23 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent">210-212; 214-219</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl23 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17>Capital</TD><TD class=xl23 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent">200; 202-209</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl23 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17>Greater So. Carolina</TD><TD class=xl23 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent">290-296</TD></TR></TBODY></TABLE>

So, if the zip code is 21106 on Sheet1, <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:eek:ffice:smarttags" /><st1:place w:st="on"><st1:City w:st="on">Baltimore</st1:City></st1:place> will populate into a column on Sheet1<o:p></o:p>
<o:p></o:p>
Vlookup doesn't work because it's not an exact match, and I'm not sure how to make a wildcard look at a range of numbers and return the answer I need. I hope that making sense. I'm a total rookie, so thanks for any help you can offer!! :biggrin:
 
Last edited:
Upvote 0

ColinKJ

Well-known Member
Joined
Jan 27, 2009
Messages
983
ADVERTISEMENT
Are you ok with a VBA solution, I'm not good on S/S formula.

If ok I'll get back to you tomorrow.

ColinKJ
 
Upvote 0

ColinKJ

Well-known Member
Joined
Jan 27, 2009
Messages
983
ADVERTISEMENT
Hi erodriguez1214,

If you could send me a private message with an email address, I've got something for you to try.

ColinKJ
 
Upvote 0

Forum statistics

Threads
1,195,963
Messages
6,012,589
Members
441,714
Latest member
mcgeesusana

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
Top