+ Reply to Thread
Results 1 to 9 of 9

Recorded macro not running correctly reasons?

  1. #1
    Forum Contributor
    Join Date
    08-07-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    202

    Recorded macro not running correctly reasons?

    Hi all,
    I have recorded a macro that transfers back and forth between 2 books. It does a drag of formula on one sheet, a drag of formula on another, runs calculations then 3 copy and paste objects. It does this 13 times. When I record the macro it does correctly. When I run it though, I get different data. I can post the macro if needed, but was just looking for possible reasons as to why it's not running just as it's programmed to do. It's even going into other cells that was not recorded. Relative references is turned off. I've done it over and over so many times now and just tired of that. 2 days of wasted work. Has to be something simple.

    Thank you so much!

  2. #2
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,535

    Re: Recorded macro not running correctly reasons?

    Re: I can post the macro if needed.
    That with an explanation, short and to the point, what you want to achieve would be a tremendous help
    The proper and concise explanation is the most important as a lot of people don't like wading through code that does not work anyway.
    Last edited by jolivanes; 01-09-2020 at 09:58 PM.

  3. #3
    Forum Contributor
    Join Date
    08-07-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    202

    Re: Recorded macro not running correctly reasons?

    Hi jolivanes and thank you!

    There is two books. It's supposed to go to Pick sheet of one book, G34 and enter "=" then go to Header sheet and pick a cell then affirm.
    From there it will calculate, then copy data from Pick sheet G36-G47 and paste into fillin of the book that has the macro, then copy and paste from B51-F51 of the Pick sheet and paste in the fillin book and do the same thing for B52-F52. It will then go to Draw Enter of the other book, drag down X-AB certain rows to 365 rows, go back to G34 enter "=" again and repeat the process 13 times. Finally re-filling Draw enter X-AB back.

    Thank you for looking and responding. Here is the macro:

    Well, it's saying I've got too many characters by over 11,000 and won't let me post the macro.

  4. #4
    Forum Contributor
    Join Date
    08-07-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    202

    Re: Recorded macro not running correctly reasons?

    I was thinking there was a certain way you have to post code on here, but I can't find that now for some reason. Puts it into a blue box? Am I doing something wrong?
    I can't upload just a sample because I can't cut anything out and it still work. It all works together and it's near 300,000 mb in size. I may just be at a loss on this one.
    Last edited by greenfox74; 01-09-2020 at 10:32 PM.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Recorded macro not running correctly reasons?

    To post code:

    1 Paste the code into the post.

    2 Select the code.

    3 Click the # button.
    If posting code please use code tags, see here.

  6. #6
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,535

    Re: Recorded macro not running correctly reasons?

    Re: certain way you have to post code on here.
    If all else fails, read the forum rules. What you are referring to is under #2.
    Just explain step by step what you want to do.
    Re: It's supposed to go to Pick sheet of one book, G34 and enter "=" then go to Header sheet and pick a cell then affirm
    The above might make sense to you but it does not mean anything to me.
    "It's supposed to go". What is supposed to go? What is the "It's"?
    Pick sheet I assume is a sheet named "Pick".
    "Of one book" Which book?
    "G34" is obviously a cell reference.
    "enter "=" then go to Header sheet and pick a cell then affirm". Sounds like Range("G34") = Sheets("Header").Range(???????)
    The "pick a cell" does not work in Excel. It needs a certain Range.
    I am not picking on you but you have to know that you know what your books look like and what you want to achieve and we don't have a clue unless it is properly explained.

  7. #7
    Forum Contributor
    Join Date
    08-07-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    202

    Re: Recorded macro not running correctly reasons?

    Quote Originally Posted by Norie View Post
    To post code:

    1 Paste the code into the post.

    2 Select the code.

    3 Click the # button.
    Thanks Norie. I knew there was something I had to do but it's been so long. It's still saying it's too long anyway.
    I may just need a different way to do what I need to.
    I do appreciate it!

  8. #8
    Forum Contributor
    Join Date
    08-07-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    202

    Re: Recorded macro not running correctly reasons?

    Quote Originally Posted by jolivanes View Post
    Re: certain way you have to post code on here.
    If all else fails, read the forum rules. What you are referring to is under #2.
    Just explain step by step what you want to do.
    Re: It's supposed to go to Pick sheet of one book, G34 and enter "=" then go to Header sheet and pick a cell then affirm
    The above might make sense to you but it does not mean anything to me.
    "It's supposed to go". What is supposed to go? What is the "It's"?
    Pick sheet I assume is a sheet named "Pick".
    "Of one book" Which book?
    "G34" is obviously a cell reference.
    "enter "=" then go to Header sheet and pick a cell then affirm". Sounds like Range("G34") = Sheets("Header").Range(???????)
    The "pick a cell" does not work in Excel. It needs a certain Range.
    I am not picking on you but you have to know that you know what your books look like and what you want to achieve and we don't have a clue unless it is properly explained.
    Thank you jolivanes,
    I know what you're saying and why. It's fine. I just can't get it down to the 15,000 character limit, which may be my whole problem with it working anyway. May just have to go a simpler route with all of it. I'll go another route with it and see if I can simplify it to make it work. Maybe set it up in smaller runs, then call each one as needed.

    Thank you very much for all your help and replies!

  9. #9
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,535

    Re: Recorded macro not running correctly reasons?

    Don't you hate it when it seems they're on your case without reason?
    Well, read the rules again. Towards the end about Quoting.

    Enough about that from my end.
    Forget about the code and just explain what you need. We'll get there for/with you.
    It might be easier if you do it, like you more or less said, do it in stages. So ask it in stages if that makes sense.
    We'll eagerly await your questions.

+ 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] runtime error when running recorded macro
    By huangwh88 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-14-2018, 10:12 PM
  2. [SOLVED] Reasons of slow running of Macro
    By ImranBhatti in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-04-2017, 06:14 AM
  3. Running pre recorded macros from selections made in list box
    By Aestivator1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-31-2015, 08:18 AM
  4. [SOLVED] Recorded macro doing more than recorded?
    By Trending in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-26-2014, 11:42 AM
  5. [SOLVED] Recorded Pivot Table Macro Doesn't Do What I Recorded!
    By diakonos1984 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-26-2013, 11:01 AM
  6. [SOLVED] Macro Not Running Correctly Sometimes
    By krisels in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-09-2012, 12:52 PM
  7. Continuously running a recorded macro-Please Help
    By Nik.Kaps in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-10-2012, 07:27 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