+ Reply to Thread
Results 1 to 6 of 6

Re: Help with a macro- 'Run-Time error '13' Type Mismatch

  1. #1
    Registered User
    Join Date
    08-16-2012
    Location
    Washington, DC
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Help with a macro- 'Run-Time error '13' Type Mismatch

    Hi everyone, I'm new to this forum, but I'm really hoping someone can help me out here. There's a macro that someone created for a worksheet that basically takes info from a financial statement and puts it into a different format to be uploaded into our accounting system. This month, for some reason it isn't working. I tried helping out the person that uses it, but I can't seem to figure out what the problem is and the person that created the macro has left the company. The part that is a problem is the part that says If ActiveCell = "XXX" Then. That's what's being flagged in the debug. See below for full code. I don't think it's the macro though, I think the problem lies with the excel spreadsheet, but I don't see anything on the spreadsheet that is wrong. The file was too large to upload, so please let me know what you need to see and I'll figure out a way to attach it.

    Thank you in advance!!!!!!!

    Please Login or Register  to view this content.
    Last edited by pman; 08-16-2012 at 03:18 PM.

  2. #2
    Registered User
    Join Date
    08-14-2012
    Location
    Rochester, NY
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    10

    Re: Help with a macro

    Can you post the rest of the code? And let me know what error you're getting specifically

    Quote Originally Posted by pman View Post
    I can't seem to figure out what the problem is and the person that created the macro has left the company.
    Sounds familiar.

  3. #3
    Registered User
    Join Date
    08-16-2012
    Location
    Washington, DC
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Help with a macro- 'Run-Time error '13' Type Mismatch

    Here is all of the code in the macro. The part that is being flagged by the debug is the end of the code in the original post:
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by pman; 08-16-2012 at 03:19 PM.

  4. #4
    Registered User
    Join Date
    08-14-2012
    Location
    Rochester, NY
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    10

    Re: Help with a macro

    Well that's pretty much what I expected, the code is meant to run until a cell containing "XXX" is reached, so "XXX" is being used to denote the end.


    What is the actual error text? If you're getting a 1004 it's possible that there is no "XXX" so the code just runs until it hits the row limit of your Excel version.

    My guess is that he's supposed to be entering "XXX" at the end of the "Summary Budget" sheet, but isn't. I'd need to see the workbook, the code is very wonky.

  5. #5
    Registered User
    Join Date
    08-16-2012
    Location
    Washington, DC
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Help with a macro- 'Run-Time error '13' Type Mismatch

    Thanks Rhynocerous,

    The message I'm getting is 'Run-Time error '13' Type Mismatch.

    You are correct, basically he has a cell in column A that has XXX as a way of marking the end, and I verified that it is in fact there so I'm not clear why that would be the issue.

    The macro in question is the "Create_MRI_Upload" macro and the password is MMREF. I'm usually pretty amazing with excel, but this macro seems unnecessarily complicated to me and I gave up

  6. #6
    Registered User
    Join Date
    08-14-2012
    Location
    Rochester, NY
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    10

    Re: Help with a macro- 'Run-Time error '13' Type Mismatch

    It doesn't look like it's tripping up on the "XXX."

    When the macro runs down column A it snags on A16 and again on A53

    Make column A some color other than white and you'll see what I mean. The formula in A16 snags on the "Note for accounting." As for A53, I bet someone accidentally hit the space bar with E53 selected and broke that formula too.

    Delete A16 which as far as I can tell will never need to have contents, and replace E53 with =SUM(E54:E54) to restore it. Data validation would have been very useful in this spreadsheet.

+ 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