+ Reply to Thread
Results 1 to 3 of 3

putting an if condition based on text in a cell - runtime error 13: type mismatch

  1. #1
    Registered User
    Join Date
    05-15-2013
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007
    Posts
    32

    putting an if condition based on text in a cell - runtime error 13: type mismatch

    Hi,

    I have the the following piece of code in my macro. The first line gives me "runtime error 13: type mismatch." How to fix this?

    ElseIf Cells(b, i + 4) = "Govt capsules" Or "fresh capsules" Or "final capsules" Then
    Sheets("Report").Select
    ActiveCell.Value = f

  2. #2
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: putting an if condition based on text in a cell - runtime error 13: type mismatch

    Hi rbs,

    please use CODE Tags around your code to make things easier to read.
    Try this :

    Please Login or Register  to view this content.
    Please click the * below if this helps

  3. #3
    Registered User
    Join Date
    05-15-2013
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: putting an if condition based on text in a cell - runtime error 13: type mismatch

    Worked. Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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