+ Reply to Thread
Results 1 to 2 of 2

Type mismatch when selecting filtered cell

  1. #1
    Forum Contributor
    Join Date
    09-04-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    298

    Type mismatch when selecting filtered cell

    What am I doing wrong? I am getting a typemismatch on


    Please Login or Register  to view this content.
    from the script below:


    Please Login or Register  to view this content.
    This is only the beginning of the script which is why you don't see the end with/loop, etc. but it is stopping on the line I listed above. Any idea why that's giving me a type mismatch?
    Last edited by ks100; 09-11-2015 at 03:44 PM.

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Type mismatch when selecting filtered cell

    Because the variable is the wrong type. i.e. not a string.

    Depending on what is going on it is probably either going to be a range (you will have to "set" the variable and remove the ".Value") or the variable type will be variant (if it is variant you can leave it as is). However, either way you do it you should probably have a firm understanding of what each means or else you will probably run into issues when you try to use the variable
    If you are happy with my response please click the * in the lower left of my post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Multiply two cell values VBA Type Mismatch
    By prjt in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-22-2015, 04:35 PM
  2. [SOLVED] Type mismatch error obtaining value from a cell
    By ssu95bm in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-09-2015, 09:30 AM
  3. [SOLVED] Run-time error '13': Type mismatch - How to work with Cell.value
    By beutlerm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-30-2014, 01:18 PM
  4. [SOLVED] type mismatch on #name in cell
    By twckfa16 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-28-2013, 05:07 PM
  5. [SOLVED] Type Mismatch when selecting items from a listbox
    By Tayque_J_Holmes in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-07-2012, 04:46 PM
  6. Type Mismatch Error when deleting a cell
    By Josiah in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-11-2008, 01:07 PM
  7. [SOLVED] Help: Compile error: type mismatch: array or user defined type expected
    By lvcha.gouqizi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-31-2005, 05:05 PM

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