+ Reply to Thread
Results 1 to 2 of 2

paste as a running tallie plz help

Hybrid View

  1. #1
    Registered User
    Join Date
    11-30-2006
    Posts
    32

    paste as a running tallie plz help

    I have a column of checkboxes in one template sheet (when checked they are true, unchecked = false) I want to make a running tally in a tracking sheet of all the trues that are recorded over time in the template sheet.

    I can't for the life of me get a running tally to work.

    My code right now (below) only copies the true or false to a column in the tracking sheet. I have a formula to count if true giving me a column with either a 1 or a 0 in the cells.

    I need it to tally everytime a 1 occurs so I can track that over the months.

    Any code suggestions

    Range("h22:h26,h36:h43,h47:h48").Select
    Selection.Copy
    Workbooks.Open ("W:\2006 QA\Wall QA\Audit Templates\tracking.xls")
    Sheets("data").Select
    Range("f5").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    ActiveWorkbook.Save
    ActiveWorkbook.Close

    This copies and pastes but I think there is a better way.

    Thank you in Advance

  2. #2
    Forum Contributor
    Join Date
    07-13-2006
    Posts
    400
    add an if statement at the beginning that tests if your true/false condition and saves it to a boolean
    i.e. if the condition appeared in H48 you'd have
    dim FalseAdd as boolean
    FalseAdd=false
    if cells(48,8)=False then
    FalseAdd=True
    end if
    then on your second page designate an area as the false tracker. assume it's G5 then add this before workbook save.
    if Falseadd=true then
    cells(5,7)=cells(5,7)+1
    end if

    hope that makes sense
    Quote Originally Posted by Jlong1980
    I have a column of checkboxes in one template sheet (when checked they are true, unchecked = false) I want to make a running tally in a tracking sheet of all the trues that are recorded over time in the template sheet.

    I can't for the life of me get a running tally to work.

    My code right now (below) only copies the true or false to a column in the tracking sheet. I have a formula to count if true giving me a column with either a 1 or a 0 in the cells.

    I need it to tally everytime a 1 occurs so I can track that over the months.

    Any code suggestions

    Range("h22:h26,h36:h43,h47:h48").Select
    Selection.Copy
    Workbooks.Open ("W:\2006 QA\Wall QA\Audit Templates\tracking.xls")
    Sheets("data").Select
    Range("f5").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    ActiveWorkbook.Save
    ActiveWorkbook.Close

    This copies and pastes but I think there is a better way.

    Thank you in Advance
    --Mark

    Quantum materiae materietur marmota monax si marmota monax materiam possit materiari?

+ 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