LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 178
Default replace() funciton with multiple tests....

so basically I'm looking to do the following, which obv doesn't work...

Replace(string, Or("purge_", "dealdrop_"), "cor010_wcout")

I've tried Replace(string, Array("purge_", "dealdrop_"), "cor010_wcout") which also doesn't work.

since i'll never be in a situation where string will contain both purge_ and dealdrop_ I've gone the route of running the replace function twice as follows:

tempstring = Replace(string, "purge_", "cor010_wcout")
tempstring = Replace(string, "dealdrop_", "cor010_wcout")

but there's Got to be a more elegant way than just trying to shove a square peg in a round hole with a big hammer... ideas?
 
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
If AND/OR funciton with multiple criteria Helen Shah Excel Worksheet Functions 2 November 2nd 09 08:48 PM
Multiple Conditional tests with Sumproduct ryguy7272 Excel Worksheet Functions 6 December 20th 08 04:09 PM
Countif Using Multiple Logic Tests Carl Excel Worksheet Functions 3 June 4th 06 07:09 AM
Multiple tests for a condition Matilda Excel Programming 4 January 6th 06 11:31 AM
Average a group of tests for grade, some tests not taken by all. Scafidel Excel Discussion (Misc queries) 4 August 19th 05 03:50 AM


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

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

About Us

"It's about Microsoft Excel"