Matching help

jsambrook

Board Regular
Joined
Feb 1, 2010
Messages
214
I have a text string from an output file but it has a random arrangement and I want to search for a word within the string and then insert a word when it reads fred for example, just put fred in a seperate box.
I'm pretty sure its a match function, but I've not used it much and cant seem to get it to work.
Can anyone offer some help?
thanks
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
If I'm understanding what you want, you can
put fred in a separate box using the =FIND function

<b>Sheet4</b><br /><br /><table border="1" cellspacing="0" cellpadding="0" style="font-family:Calibri,Arial; font-size:11pt; background-color:#ffffff; padding-left:2pt; padding-right:2pt; "> <colgroup><col style="font-weight:bold; width:30px; " /><col style="width:110px;" /><col style="width:175px;" /><col style="width:149px;" /><col style="width:230px;" /></colgroup><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td > </td><td >A</td><td >B</td><td >C</td><td >D</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >1</td><td >Search For</td><td >Search In</td><td >Found at Character #</td><td style=" border-bottom-style:solid; border-bottom-width:1px; border-bottom-color:#000000; ">Put fred in a Separate Box</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >2</td><td >fred</td><td >blahblahfredblahblah</td><td style="text-align:center; border-right-style:solid; border-right-width:1px; border-right-color:#000000; ">9</td><td style=" border-right-style:solid; border-bottom-style:solid; border-right-width:1px; border-bottom-width:1px; border-right-color:#000000; border-bottom-color:#000000; ">fred</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >3</td><td > </td><td > </td><td > </td><td style=" border-bottom-style:solid; border-bottom-width:1px; border-bottom-color:#000000; "> </td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >4</td><td >fred</td><td >blahblah</td><td style=" border-right-style:solid; border-right-width:1px; border-right-color:#000000; ">#VALUE!</td><td style=" border-right-style:solid; border-bottom-style:solid; border-right-width:1px; border-bottom-width:1px; border-right-color:#000000; border-bottom-color:#000000; "> </td></tr></table><br /><table style="font-family:Arial; font-size:10pt; border-style: groove ;border-color:#00ff00;background-color:#fffcf9; color:#000000; "><tr><td ><b>Spreadsheet Formulas</b></td></tr><tr><td ><table border = "1" cellspacing="0" cellpadding="2" style="font-family:Arial; font-size:9pt;"><tr style="background-color:#cacaca; font-size:10pt;"><td >Cell</td><td >Formula</td></tr><tr><td >C2</td><td >=FIND(A2,B2)</td></tr><tr><td >D2</td><td >=IF(ISERR<span style=' color:008000; '>(FIND<span style=' color:#0000ff; '>(A2,B2)</span>)</span>,"",A2)</td></tr></table></td></tr></table> <br />Excel tables to the web - Excel Jeanie Html 4
 
Last edited:
Upvote 0
Can I now use this to form some sort of lookup? So I have a number of identifiers, like Fred, but I want to know which is in each cell. There are too many to use a series of if functions. I was thinking index matching or something may work, but everything I have tried doesn't. I suspect it wants something a bit more sophisticated than I can manage!
I hope I've explained it ok.
Thanks
 
Upvote 0
Can I now use this to form some sort of lookup? So I have a number of identifiers, like Fred, but I want to know which is in each cell. There are too many to use a series of if functions. I was thinking index matching or something may work, but everything I have tried doesn't. I suspect it wants something a bit more sophisticated than I can manage!

It would help if you could post a small example of what your data will look like and your desired result.

Please make it clear what you want the result to be when one match is found, no matches are found, and more than one match are found.
Also, what do you want to happen if the identifier (fred) appears more than one time in the text string?

Depending on your details either an array formula or VBA code might be able to accomplish your task.
 
Upvote 0
its items from my bank statement, but every occurance of fred shoud report fred and every occurance of tesco should report shopping etc. If no match, then blank.
 
Upvote 0
Can I now use this to form some sort of lookup? So I have a number of identifiers, like Fred, but I want to know which is in each cell. There are too many to use a series of if functions. I was thinking index matching or something may work, but everything I have tried doesn't. I suspect it wants something a bit more sophisticated than I can manage!
I hope I've explained it ok.
Thanks
See if this is what you had in mind:

http://www.mrexcel.com/forum/showthread.php?t=563731
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,756
Members
452,940
Latest member
rootytrip

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