+ Reply to Thread
Results 1 to 8 of 8

counting cell value changes

  1. #1
    Registered User
    Join Date
    06-09-2015
    Location
    Croatia
    MS-Off Ver
    2010
    Posts
    8

    counting cell value changes

    Im trying to find a way to count cell value changes, eg. if cell A1 is changed, B2 value would be 1. When A1 is changed again, B2 is 2, etc.
    I've managed to do it with this:

    Private Sub Worksheet_Change(ByVal Target As Range)

    If Target.Address = "A17" Then [E14].Value = [E14].Value + 1

    End Sub
    but it's not working if there is a formula inside cell (eg. =IF(C1="Yes";1;0)).

  2. #2
    Valued Forum Contributor nigelbloomy's Avatar
    Join Date
    11-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1,011

    Re: counting cell value changes

    Could you redirect your worksheet change formula to look at the place where the value is changing (C1 in your example) instead of the formula that is looking at the change?
    If Target.Address = "C1" Then [E14].Value = [E14].Value + 1
    Some people volunteer in soup kitchens or hospitals. I choose to make the world better by trying to help you with Excel. We're all learning.

    <---Click * Add Reputation for all helpful comments. It's like giving a smile.
    Forum Rules: How to mark your post [Solved] and have a happier, Excel enriched life.

  3. #3
    Registered User
    Join Date
    06-09-2015
    Location
    Croatia
    MS-Off Ver
    2010
    Posts
    8

    Re: counting cell value changes

    C1 also contains formula

  4. #4
    Registered User
    Join Date
    06-16-2015
    Location
    USA
    MS-Off Ver
    MS Office 2010
    Posts
    28

    Re: counting cell value changes

    What goal are you trying to accomplish by doing this? Is it just to test because there might be a better way around it.

  5. #5
    Registered User
    Join Date
    06-09-2015
    Location
    Croatia
    MS-Off Ver
    2010
    Posts
    8

    Re: counting cell value changes

    Well, it is connected with this thread:
    http://www.excelforum.com/excel-form...ell-value.html

    What im trying to do now is to count how many times green cell shows up (and only green cell).

  6. #6
    Valued Forum Contributor nigelbloomy's Avatar
    Join Date
    11-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1,011

    Re: counting cell value changes

    This may be helpful from here:
    http://www.exceltoxl.com/index.php?p...&c=1&tb=1&pb=1

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-16-2015
    Location
    USA
    MS-Off Ver
    MS Office 2010
    Posts
    28

    Re: counting cell value changes

    Could you do a while loop and set it equal to something like

    While Interior.Color(Cells_____) = 'green
    'count number of cells green
    B2='num of green cells
    wend

  8. #8
    Registered User
    Join Date
    06-09-2015
    Location
    Croatia
    MS-Off Ver
    2010
    Posts
    8

    Re: counting cell value changes

    nigelbloomy, thanks for a link, ill try something with that.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Need a =(Cell)-TODAY() Formula to stop counting once the Date in (Cell) occurs
    By Dutch01 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-18-2015, 03:23 PM
  2. [SOLVED] Counting an occupied cell with a date in the cell
    By nu2tex in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-20-2014, 09:23 AM
  3. [SOLVED] Counting within a cell
    By peterrobo in forum Excel General
    Replies: 7
    Last Post: 05-22-2012, 12:12 AM
  4. [SOLVED] Counting - Color of cell and words in the cell
    By bommar2 in forum Excel General
    Replies: 5
    Last Post: 05-25-2011, 05:06 PM
  5. Counting a cell based on the content of adjoining cell
    By themax16 in forum Excel General
    Replies: 6
    Last Post: 06-02-2008, 02:36 PM

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