Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Jelinek
 
Posts: n/a
Default Count on cell for each time it is changed

I would like to count the number of times a cell has been amended/ changed

e.g cell b2 has the word red it it, in cell c2 i would like a counter for
everytime the cell in b2 has changed, at the end of the day you get final
number. Is this at all possible?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Art
 
Posts: n/a
Default Count on cell for each time it is changed

Jelinek,

You can do it by putting the following VBA macro in your sheet:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$2" Then
Cells(2, 3) = Cells(2, 3) + 1
End If
End Sub

Art

"Jelinek" wrote:

I would like to count the number of times a cell has been amended/ changed

e.g cell b2 has the word red it it, in cell c2 i would like a counter for
everytime the cell in b2 has changed, at the end of the day you get final
number. Is this at all possible?

  #3   Report Post  
Posted to microsoft.public.excel.misc
Jelinek
 
Posts: n/a
Default Count on cell for each time it is changed

Art,

I am only used to working with very basic macos, how do i get this Macro to
work, i tried cutting and pasteing the code putting into a module in visual
basic editor, but does not seem to do anything?

What am i doing wrong?

Thanks

Simon
"Art" wrote:

Jelinek,

You can do it by putting the following VBA macro in your sheet:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$2" Then
Cells(2, 3) = Cells(2, 3) + 1
End If
End Sub

Art

"Jelinek" wrote:

I would like to count the number of times a cell has been amended/ changed

e.g cell b2 has the word red it it, in cell c2 i would like a counter for
everytime the cell in b2 has changed, at the end of the day you get final
number. Is this at all possible?

  #4   Report Post  
Posted to microsoft.public.excel.misc
Art
 
Posts: n/a
Default Count on cell for each time it is changed

Jelinek,

This particular macro needs to be in the module assigned to the sheet you're
working on. If you look in the VB editor, you should see a list of sheets
underneath Excel Objects. Choose the sheet that you're working with and
double click it. You should get a window with 2 drop down boxes at the top
-- one says General and one says Declarations.

Drop down the one that says General and select Worksheet instead. It will
create a "shell" for a macro -- that you don't want. Now go to the drop down
on the right and select "change" instead of "selection change". You can now
delete the "selection change" one that was created.

You'll see that the top line of what was now created is the same as the top
line of the macro that I sent to you. Fill in the rest of it. With any luck
this should work.

Art

"Jelinek" wrote:

Art,

I am only used to working with very basic macos, how do i get this Macro to
work, i tried cutting and pasteing the code putting into a module in visual
basic editor, but does not seem to do anything?

What am i doing wrong?

Thanks

Simon
"Art" wrote:

Jelinek,

You can do it by putting the following VBA macro in your sheet:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$2" Then
Cells(2, 3) = Cells(2, 3) + 1
End If
End Sub

Art

"Jelinek" wrote:

I would like to count the number of times a cell has been amended/ changed

e.g cell b2 has the word red it it, in cell c2 i would like a counter for
everytime the cell in b2 has changed, at the end of the day you get final
number. Is this at all possible?

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
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM
How do I get one cell to record the time another cell was changed. Reigning in Seattle Excel Discussion (Misc queries) 1 December 17th 04 07:45 PM
Combined date time cell to separate date & time components Mark Ada Excel Discussion (Misc queries) 1 December 2nd 04 02:48 AM
Combined date time cell to separate date & time components Mark Ada Excel Discussion (Misc queries) 1 December 2nd 04 12:07 AM
Combined date time cell to separate date & time components Mark Ada Excel Discussion (Misc queries) 1 December 2nd 04 12:07 AM


All times are GMT +1. The time now is 03:51 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"