Results 1 to 8 of 8

runtime error '13' type mismatch

Threaded View

  1. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,997

    Re: runtime error '13' type mismatch

    Try this:
    Dim lngrows As Long
    lngrows = Sheets("sheet3").UsedRange.rows.Count
    For i = 2 To lngrows
        If IsError(Cells(i, 44).value) Then
            Cells(i, 44).ClearContents
        End If
    Next i
    Note: I renamed your rows variable as rows is already an Excel property and I changed the data type to Long rather than integer since there are more rows in a sheet than an integer can cope with.
    Last edited by romperstomper; 08-18-2010 at 04:09 PM.
    Everyone who confuses correlation and causation ends up dead.

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