Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35
Default Keep text matching a wildcard spec in replace/substitute

I want to replace a text string (in many formulas) that contains fixed
initial and terminal strings to be replaced and an intermediate string that
needs to be left in place. For example I want to change:
VLOOKUP(<inter-string, 1, FALSE)
into
MATCH(<inter-string, 0)

How can I do this when the REPLACE command does not preserve the text
matching the wildcard * character?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default Keep text matching a wildcard spec in replace/substitute

You may have to do it in a multi-step process.

First, find & replace "=" with "ZZZ="
to prevent formula errors from generating

Find & Replace "VLOOKUP" with "MATCH"
Find & Replace ",1,FALSE" with ",0"

Finally, restore formula functionality by
Find & Replace "ZZZ=" with "="

Not a perfect solution, but it works.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Hershmab" wrote:

I want to replace a text string (in many formulas) that contains fixed
initial and terminal strings to be replaced and an intermediate string that
needs to be left in place. For example I want to change:
VLOOKUP(<inter-string, 1, FALSE)
into
MATCH(<inter-string, 0)

How can I do this when the REPLACE command does not preserve the text
matching the wildcard * character?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 265
Default Keep text matching a wildcard spec in replace/substitute

In article ,
Hershmab wrote:

I want to replace a text string (in many formulas) that contains fixed
initial and terminal strings to be replaced and an intermediate string that
needs to be left in place. For example I want to change:
VLOOKUP(<inter-string, 1, FALSE)
into
MATCH(<inter-string, 0)

How can I do this when the REPLACE command does not preserve the text
matching the wildcard * character?



Somewhat unclear... Can you provide a small sample of the data, along
with the expected result?

--
Domenic
Microsoft Excel MVP
www.xl-central.com
Your Quick Reference to Excel Solutions
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35
Default Keep text matching a wildcard spec in replace/substitute

This is not an ideal solution simply because there may be other instances of
"=VLOOKUP" without ",1,FALSE". I need some way of picking out just the
formulae I need to change, so that I do not make changes elsewhere that I
have to reverse somehow.

I tried using autofilter for that purpose, but I have not found out how to
use autofilter on formulae, only on values.

"Luke M" wrote:

You may have to do it in a multi-step process.

First, find & replace "=" with "ZZZ="
to prevent formula errors from generating

Find & Replace "VLOOKUP" with "MATCH"
Find & Replace ",1,FALSE" with ",0"

Finally, restore formula functionality by
Find & Replace "ZZZ=" with "="

Not a perfect solution, but it works.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Hershmab" wrote:

I want to replace a text string (in many formulas) that contains fixed
initial and terminal strings to be replaced and an intermediate string that
needs to be left in place. For example I want to change:
VLOOKUP(<inter-string, 1, FALSE)
into
MATCH(<inter-string, 0)

How can I do this when the REPLACE command does not preserve the text
matching the wildcard * character?

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
Find and Replace/Substitute Formulas Kathy123 Excel Worksheet Functions 4 December 12th 08 12:24 AM
How to substitute a comma with a newline char using Replace. edspyhill01 Excel Discussion (Misc queries) 9 July 30th 06 12:38 AM
Substitute/Replace Viktor Ygdorff Charts and Charting in Excel 0 July 17th 06 12:37 PM
Replace or Substitute for COMBIN function Jaja Excel Discussion (Misc queries) 6 January 1st 06 02:18 PM
Substitute ,replace and delete in a cell. Doug Excel Worksheet Functions 2 November 9th 05 03:50 PM


All times are GMT +1. The time now is 09:38 PM.

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"