Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 93
Default Replace Function that uses lookup table?

I have a large (50k+records) spreadsheet I've been 'cleaning' using some
basic cell functions that look for specific strings and then remove or
substitute, using mostly if(isnumber(search("String", Cell#) and things like
left, right, substitute.

However these are getting kind of long as the lists of words to
remove/replace is getting large.

At it's simplest I'd love to do something that effectively does:

In This Cell
If the String Contains <AnyWordsInThisTable/Row/Etc
Remove that Word

Even Better would be if I had a two column sheet (e.g. WordsSheet) and could
do

If this String Contains Any of the Words in WordSheet:ColumnA
Replace with WordSheet;ColumnB

Ideally in either/both cases I could specify Whole or Partial Word

Any ideas appreciated, my cell formulas are getting quite clunky and hard to
both create and troubleshoot!

Thanks in advance!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Eva Eva is offline
external usenet poster
 
Posts: 197
Default Replace Function that uses lookup table?

Hi
Create a tab called List, in Column A put the description in col B - what
you need as the result of the search

Then paste the following formula in your data:
=VLOOKUP(INDEX(List!A$2:A$200,MATCH(1,--ISNUMBER(SEARCH(List!A$2:A$200,A2)),0)),List!A:B,2 ,FALSE)

It is an array formula (click Ctrl+shift+enter)
--

Please click "yes" if this post helped you!

Greatly appreciated

Eva


"msnyc07" wrote:

I have a large (50k+records) spreadsheet I've been 'cleaning' using some
basic cell functions that look for specific strings and then remove or
substitute, using mostly if(isnumber(search("String", Cell#) and things like
left, right, substitute.

However these are getting kind of long as the lists of words to
remove/replace is getting large.

At it's simplest I'd love to do something that effectively does:

In This Cell
If the String Contains <AnyWordsInThisTable/Row/Etc
Remove that Word

Even Better would be if I had a two column sheet (e.g. WordsSheet) and could
do

If this String Contains Any of the Words in WordSheet:ColumnA
Replace with WordSheet;ColumnB

Ideally in either/both cases I could specify Whole or Partial Word

Any ideas appreciated, my cell formulas are getting quite clunky and hard to
both create and troubleshoot!

Thanks in advance!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
LOOKUP function syntax across a table? Marc Excel Worksheet Functions 6 March 25th 09 12:19 AM
lookup and Replace with value Nadeem Masood Excel Worksheet Functions 4 March 3rd 09 05:45 PM
Formula to replace a Pivot table function Sunnyskies Excel Discussion (Misc queries) 3 June 6th 07 07:49 AM
Variable Table Array in Lookup Function matt_the_brum Excel Worksheet Functions 6 August 4th 06 05:07 PM
Pivot table doing a lookup without using the lookup function? NGASGELI Excel Discussion (Misc queries) 0 August 2nd 05 05:08 AM


All times are GMT +1. The time now is 06:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"