+ Reply to Thread
Results 1 to 9 of 9

VBA doesn't copy the AVERAGE

  1. #1
    Registered User
    Join Date
    03-13-2010
    Location
    Istanbul, Turkey
    MS-Off Ver
    Excel 2010 Beta
    Posts
    13

    Question VBA doesn't copy the AVERAGE

    Please Login or Register  to view this content.
    I am good with the second section. It copies the old and new values to the ranged cells. But the first section doesn't work. Neither it is taking the average, nor copying the new value to M66 and old value to M67.

    What am I doing wrong?!?!
    Last edited by Litstone; 03-18-2010 at 12:59 PM.

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: VBA doesn't copy the AVERAGE

    Maybe:

    Please Login or Register  to view this content.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: VBA doesn't copy the AVERAGE

    1. There no need to insert the formula repetitively.

    2. There no call to EnterFormula in the code that appears. If it's called from VBA, it should be in a code module, not the sheet module. If it's called as a worksheet function, it won't work regardless of where it appears.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: VBA doesn't copy the AVERAGE

    Quote Originally Posted by shg View Post
    1. There no need to insert the formula repetitively.

    2. There no call to EnterFormula in the code that appears. If it's called from VBA, it should be in a code module, not the sheet module. If it's called as a worksheet function, it won't work regardless of where it appears.
    Both fair points.

    Dom

  5. #5
    Registered User
    Join Date
    03-13-2010
    Location
    Istanbul, Turkey
    MS-Off Ver
    Excel 2010 Beta
    Posts
    13

    Unhappy Re: VBA doesn't copy the AVERAGE

    Unfortunately not

  6. #6
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: VBA doesn't copy the AVERAGE

    Quote Originally Posted by Litstone View Post
    Unfortunately not
    What? Does it not do what is required? Does it not work at all?

    Have you followed Shg's advice about the location of the code. At the moment it will not run automatically if that is what you are expecting it to do.

    A bit more info would be useful.

    Dom

  7. #7
    Registered User
    Join Date
    03-13-2010
    Location
    Istanbul, Turkey
    MS-Off Ver
    Excel 2010 Beta
    Posts
    13

    Re: VBA doesn't copy the AVERAGE

    So it is getting more clear because my cells ranged from M6 to M47 contain formulas, too.

    In tis case I have to write them too with macro. So is this a true definition?

    Please Login or Register  to view this content.
    So at the and it should look like that but I could make it Run:

    B6:B47 called from external source.

    Please Login or Register  to view this content.
    Kur.xlsm
    Last edited by Litstone; 03-18-2010 at 12:18 PM. Reason: Attached .xlsx

  8. #8
    Registered User
    Join Date
    03-13-2010
    Location
    Istanbul, Turkey
    MS-Off Ver
    Excel 2010 Beta
    Posts
    13

    Re: VBA doesn't copy the AVERAGE

    I am very new with macros and I have spent a full of my day for this thing. I am feeling like a dummy blond crash test mannequin.

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: VBA doesn't copy the AVERAGE

    I am feeling like a dummy blond crash test mannequin


    The thread is marked Solved -- is it?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 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