Results 1 to 5 of 5

Thread: EXCEL 2010: Why does macro record different to what I type?

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2008
    Location
    Kent, England
    Posts
    713

    EXCEL 2010: Why does macro record different to what I type?

    Hi Guys,

    Hope someone can help.

    Basically I am recording / writing a macro to allow me to count all the rows before and after filter.

    so I start the Macro recording and type into cell A6
    Code:
    =COUNTIF((G2:G999999),"Void")
    The Macro then records:
    Code:
    ActiveCell.FormulaR1C1 = "=COUNTIF((R[-4]C[6]:R[999993]C[6]),""Void"")"
    Then I type into Cell A9
    Code:
    =COUNTIF((G2:G99999),"Purc")
    The Macro then records:
    Code:
    ActiveCell.FormulaR1C1 = "=COUNTIF((R[-7]C[6]:R[99990]C[6]),""Purc"")"
    So why is it that I choose to type in the above and its changed what I typed? why has it put the additional information in against what I typed?

    Can anyone shed any light on this? and does this mean in fact it is not go as far counting down to cell "999999"?
    Last edited by JayCR; Aug 4th, 2011 at 11:14 AM.
    "Wisdom is only truly achieved, when you realise you dont know everything" ... I must be a genius because I always have to ask stupid questions...

    Pointing an idiot like me in the right direction, is always appreciated by the idiot, explaining how to do what you have pointed the idiot to, is appreciated even more. I apologise to all experienced coders who will think I am an idiot, you are right, I am an idiot, but I am an idiot who is trying to learn

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width