Help with some Macros
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Help with some Macros

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    21
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    First off I would love to give much thanks to Thomas Schreiner, he has been so much help, but I do not want to take all of his time.

    I have been working on a project, well a basic and Tom has taken it to new levels I never thought possible.

    I have a monthly log and need it to do some calculations based on another sheet.

    Just simple (I think) calculations based on the field being emply or haveing a date.

    It doesn't matter what is there just if anything is there.

    example:

    sheet 1
    column A
    name
    Column B
    Date

    The other worksheet:
    If column B is written in add one to the total if not ignore

    I now know I know less than before. The more functions I try, the worse everything gets.

    I may just stick to SUM(a1:b2) that is a sure calculation.

    Thanks

    Mike

  2. #2
    MrExcel MVP Al Chara's Avatar
    Join Date
    Feb 2002
    Location
    Newark, Delaware
    Posts
    1,701
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    I am not sure exactly what you want, but you can edit the following to fit your situation:

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target <> "" Then Total = Total + 1
    Worksheets("Sheet1").Range("A1").Value = Worksheets("Sheet1").Range("A1").Value + 1
    End Sub

    Put this code in the code for the worksheet that will be added on to. The code will add "1" to Cell A1 on Sheet1 everytime a cell is changed and not blank.
    Best regards,
    Allan Chara
    http://www.mrspreadsheets.com

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com