Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Group,
I created a custom function to loop through a specified text string to look for a combination within a string. This works fine but on an optional element of the formula i am getting an error. Even when i take out the optional part i still get an error. How do i get the function to return my desired string? Fish '''code is as follows Public Function IDSRCH(Cell_Search As Range, String_Search As String, Optional Column_refrnc As Range) Dim IGR As Integer '''Finds the text Search string For IGR = 1 To Len(Cell_Search.Value) Debug.Print Mid(UCase(Cell_Search.Value), IGR, Len (String_Search)) If Mid(UCase(Cell_Search.Value), IGR, Len (String_Search)) = UCase(String_Search) Then '''''''''Trigger now sets to another coumn If Column_refrnc Is Nothing Then Cells(Cell_Search.Row, Cell_Search.Column + 2).Value = String_Search Else Cells(Cell_Search.Row, Column_refrnc.Columns.Value) = String_Search End If End If Next IGR |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
custom field with custom formula in pivot table! | Excel Worksheet Functions | |||
custom add formula | Excel Worksheet Functions | |||
Custom cell formula | Excel Programming | |||
Commenting custom formula fields/formula on formula editor | Excel Programming | |||
Custom formula | Excel Programming |