Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    May 2004
    Location
    Toronto, Ontario, Canada
    Posts
    425
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Add count to cell (Excel 2000)

    Hi all,

    I would like to be able to add 1 to a cell if a value in another cell = true

    Public Sub Checkvalues()
    Dim I As Integer
    I = I + 1
    If Sheets("logs").Range("F5").Value = "A" Then
    Sheets("charts").Select
    Cells(1, 1).Value = I
    End If
    End Sub


    This doens't work for me...I keep getting 1, all I want to do is add 1 and continue the total.

    Thanks Darryl.

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Add count to cell (Excel 2000)

    Try this:

    <pre>Public Sub Checkvalues()
    If Sheets("logs").Range("F5").Value = "A" Then
    Sheets("charts").Cells(1, 1).Value = Sheets("charts").Cells(1, 1).Value + 1
    End If
    End Sub
    </pre>

    Legare Coleman

  3. #3
    4 Star Lounger
    Join Date
    May 2004
    Location
    Toronto, Ontario, Canada
    Posts
    425
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Re: Add count to cell (Excel 2000)

    Thanks,

    It works great!

    Darryl.

Posting Permissions

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