Results 1 to 3 of 3

Thread: EXcel help

  1. #1
    Join Date
    Apr 2004
    Posts
    15

    Unanswered: EXcel help

    HI,

    i am trying to use iserror function in combination with if, and i am getting an error, wondering, if anyone can assist me to correct this.

    Thanks
    Function Amexdesc(rcell As Range)
    Dim sText As String
    Dim ldesc As String
    Dim lword As String
    Dim wSheet As Worksheet
    Dim vFound

    sText = rcell.Value

    ldesc = IsError(WorksheetFunction.Find("AVIS", sText))
    If ldesc = False Then
    ldesc = "Travel Expenses"
    Else
    ldesc = ""
    End If

    Amexdesc = ldesc

    End Function

  2. #2
    Join Date
    Feb 2002
    Posts
    29
    Try this:

    Function Amexdesc(rcell As Range)
    Dim sText As String
    Dim ldesc As String
    Dim lword As String
    Dim wSheet As Worksheet
    Dim vFound
    sText = rcell.Value
    If InStr(sText, "AVIS") > 0 Then
    ldesc = "Travel Expenses"
    Else
    ldesc = ""
    End If
    Amexdesc = ldesc
    End Function

  3. #3
    Join Date
    Apr 2004
    Posts
    15
    thank you very much, it worked perfectly fine.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •