Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Replace in Excel 97
I used the Replace function in my code while developing in Excel XP. However, it comes back with an error when I try to run it in Excel 97. Is there an equivalent to the Replace function in Excel 97? Note: this is not being used in the formula bar. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Replace in Excel 97
HOWTO: Simulate Visual Basic 6.0 String Functions in VB5
http://support.microsoft.com/default...b;EN-US;188007 HTH Paul -------------------------------------------------------------------------------------------------------------- Be advised to back up your WorkBook before attempting to make changes. -------------------------------------------------------------------------------------------------------------- I used the Replace function in my code while developing in Excel XP. However, it comes back with an error when I try to run it in Excel 97. Is there an equivalent to the Replace function in Excel 97? Note: this is not being used in the formula bar. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Replace in Excel 97
No, Replace came in in XL2000.
You can write your own though Function Replace97(Source As String, Find As String, Replace As String) Dim iPos As Long Dim sTemp As String sTemp = Source Do iPos = InStr(sTemp, Find) sTemp = Left(sTemp, iPos - 1) & Replace & Right(sTemp, Len(sTemp) - Len(Find) - iPos + 1) Loop Until InStr(sTemp, Find) = 0 Replace97 = sTemp End Function or you could use the worksheet substitute function Debug.Print Application.Substitute("Bob", "o", "a") -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "pcw" wrote in message ... I used the Replace function in my code while developing in Excel XP. However, it comes back with an error when I try to run it in Excel 97. Is there an equivalent to the Replace function in Excel 97? Note: this is not being used in the formula bar. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find and Replace - Replace with Blank Space | Excel Discussion (Misc queries) | |||
Can I replace a ' at the beginning of a text cell using Replace | Excel Discussion (Misc queries) | |||
find and replace - replace data in rows to separated by commas | Excel Worksheet Functions | |||
replace axis text with graphics on excel chart (excel 2003) | Charts and Charting in Excel | |||
How can I use replace(alt+H) for mutiple items needing replace | Excel Worksheet Functions |