+ Reply to Thread
Results 1 to 5 of 5

My loop macro is not working, returning a mismatch error??

  1. #1
    Registered User
    Join Date
    02-10-2014
    Location
    Jeddah, Saudi Arabia
    MS-Off Ver
    Excel 2010
    Posts
    2

    My loop macro is not working, returning a mismatch error??

    I have written the below macro. The idea is to keep the macro running until the difference between 2 ranges (Dividend_payout and Dividend_payout_paste) become 0. The "dividend_payout_req_check" is the difference between the above 2 ranges. I have used this same type of macro before with and it seemed to work well. Currently the macro stops running and gives me a mismatch error no. 13.

    if i ignore the error and keep activating the same macro, i eventually get the required result, but this requires several iterations and i keep getting the error even after the difference becomes "0". Any idea why this may be??

    Thanks

    Please Login or Register  to view this content.
    [/I]
    Last edited by arlu1201; 02-10-2014 at 05:44 AM. Reason: Use code tags in future.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: My loop macro is not working, returning a mismatch error??

    can you attach a sample file for resting ?
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    02-10-2014
    Location
    Jeddah, Saudi Arabia
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: My loop macro is not working, returning a mismatch error??

    Thanks for responding. Its a rather large file (15Mb's plus) and is actually composed of multiple files. It also contains confidential infomration. Is there any other way i can shed more light on my problem for you?

    Thanks

  4. #4
    Valued Forum Contributor bulina2k's Avatar
    Join Date
    11-20-2012
    Location
    Urziceni, Ialomita, Romania
    MS-Off Ver
    2019 and 365
    Posts
    867

    Re: My loop macro is not working, returning a mismatch error??

    Hello,

    I don't know if this works (in absence of your sample/file) but you could try to round up the value in the range, not the range so you might add ".value" :

    Please Login or Register  to view this content.
    .. and don't forget to have fun!
    Bogdan.

    mark SOLVED and Add Reputation if my answer pleases you

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: My loop macro is not working, returning a mismatch error??

    Can't really tell what's happening without a sample. You may have text data in the range you are trying to calculate? Anyway my best guess. To avoid the error you could try this.

    Please Login or Register  to view this content.

+ 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. [SOLVED] For Next Loop in column - type mismatch error
    By TC1980 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-03-2013, 09:14 AM
  2. Mismatch error from nested Do While loop?
    By scope951 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-26-2010, 01:01 PM
  3. Type MisMatch error (13) with if statement using loop
    By mdnghtsnpr in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-26-2010, 10:37 AM
  4. Error 13 Type Mismatch in For Next Loop
    By VBAxellence in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-30-2009, 12:47 PM
  5. DoWhile Loop & Type mismatch error
    By oakman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-27-2006, 06:28 AM

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