+ Reply to Thread
Results 1 to 3 of 3

how do I make a counter cell in excel

Hybrid View

  1. #1
    Ehab Hassan
    Guest

    how do I make a counter cell in excel

    Can some one help me in telling me how can I do a counter in the excel which
    will increase the number by 1 every time I press F9.

  2. #2
    Chris Marlow
    Guest

    RE: how do I make a counter cell in excel

    Hi,

    There may be a neater way to do this, but worth trying;

    In the sheets code module add;

    Private lMyCounter As Long

    Public Property Get MyCounter() As Long

    MyCounter = lMyCounter

    End Property

    Public Property Let MyCounter(lNewValue As Long)

    lMyCounter = lNewValue

    End Property

    In a 'normal' module add;

    Public Function ShowMyCounter(dTrigger As Date) As Long

    Sheet1.MyCounter = Sheet1.MyCounter + 1

    xMyCounter = Sheet1.MyCounter

    End Function

    In the sheet you can now reference the formula;

    =ShowMyCounter(NOW())

    The 'trigger' is required to make the thing recalc when you hit f9.

    Regards,

    Chris.

    --
    Chris Marlow
    MCSD.NET, Microsoft Office XP Master


    "Ehab Hassan" wrote:

    > Can some one help me in telling me how can I do a counter in the excel which
    > will increase the number by 1 every time I press F9.


  3. #3
    Niek Otten
    Guest

    Re: how do I make a counter cell in excel

    http://www.mcgimpsey.com/excel/accumulator.html

    --
    Kind regards,

    Niek Otten

    "Ehab Hassan" <Ehab Hassan@discussions.microsoft.com> wrote in message
    news:9B6BAFE3-C6D9-4918-BDA4-7A44FBF741AD@microsoft.com...
    > Can some one help me in telling me how can I do a counter in the excel
    > which
    > will increase the number by 1 every time I press F9.




+ 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