Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Find and replace
I am trying to create a function that must look at a cell if the cell
contains EG. "/" it must replace it with an "_" and then return the value of the cell, if it does not contain a "/", it must return the value as is. The code that I used works fine but if it does not contain a "/" it returns a error #value! Here is code that i used pls help! Function FReplace1(ReplaceField1) As String If Application.WorksheetFunction.IsNumber(Application .WorksheetFunction.Search("/", ReplaceField1)) = "true" Then ReplaceField1 = Replace(ReplaceField1, "/", "_") FReplace1 = ReplaceField1 Else FFeplace1 = ReplaceField1 End If End Function Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find & Replace woes | Excel Worksheet Functions | |||
Find and Replace | Excel Worksheet Functions | |||
find and replace, within workbook | Excel Discussion (Misc queries) | |||
Find and replace of word causes change of font formatting | New Users to Excel | |||
VB Find and Replace | Excel Worksheet Functions |