Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default how do I make a counter cell in excel

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

--
Kind regards,

Niek Otten

"Ehab Hassan" <Ehab wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I set up a counter cell? Valpocandi Excel Worksheet Functions 2 September 11th 07 06:59 PM
dynamic character counter for merged cell text field JASelep Excel Worksheet Functions 1 August 29th 07 07:24 PM
Cell counter Haza Excel Discussion (Misc queries) 2 January 20th 06 02:18 PM
How do I set up a counter in excel? Solanajack Setting up and Configuration of Excel 1 July 27th 05 11:51 PM
Make counter invisible hotherps[_6_] Excel Programming 2 January 17th 04 04:23 PM


All times are GMT +1. The time now is 09:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"