Results 1 to 19 of 19

What is in these cells?

Threaded View

  1. #13
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: What is in these cells?

    A fringe case perhaps, but your function would return TRUE if the cell contains only a prefix character. I think a generic UDF (without error handling) would be:
    Public Function HasNullString(ByVal rngCell As Range) As Boolean
        
        Dim rngFirstCell As Range
        
        Set rngFirstCell = rngCell.Cells(1)
        
        If Not VBA.IsEmpty(rngFirstCell) Then
            If rngFirstCell.Formula = vbNullString Then
                HasNullString = (VBA.LenB(rngCell.PrefixCharacter) = 0)
            End If
        End If
        
    End Function
    I haven't properly tested it, so I might have missed something.

    I've never needed to use a function like this, so I think any problems with this would be fairly unusual.
    Last edited by Colin Legg; 03-21-2011 at 12:04 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1