Help with a function in Excel

Discussion in 'Software' started by asymvivastos, Oct 17, 2007.

  1. ThomasMc

    ThomasMc Gigabyte Poster

    1,507
    49
    111
    you could use the worksheet change event as your trigger

    Code:
    Private Sub Worksheet_Change(ByVal Target As Range)
    If Intersect(Target, Range("A1")) Is Nothing Then Exit Sub
    Application.EnableEvents = False
    Range("A1").Value = Range("A1").Value * 12
    Application.EnableEvents = True
    End Sub
    
    untested
     
    Certifications: MCDST|FtOCC
    WIP: MCSA(70-270|70-290|70-291)
  2. Sparky
    Highly Decorated Member Award 500 Likes Award

    Sparky Zettabyte Poster Moderator

    10,718
    543
    364
    hee hee! :biggrin

    Was just about to post the change event code as well :oops:
     
    Certifications: MSc MCSE MCSA:M MCSA:S MCITP:EA MCTS(x5) MS-900 AZ-900 Security+ Network+ A+
    WIP: Microsoft Certs
  3. ThomasMc

    ThomasMc Gigabyte Poster

    1,507
    49
    111
    :p lol, but I'm with lee why use the same cell
     
    Certifications: MCDST|FtOCC
    WIP: MCSA(70-270|70-290|70-291)
  4. r.h.lee

    r.h.lee Gigabyte Poster

    1,011
    52
    105
    greenbrucelee,

    From a data standpoint, how about manually multiplying by 12 then inputting that data into the cell?
     
    Certifications: MCSE, MCP+I, MCP, CCNA, A+
    WIP: CCDA
  5. Sparky
    Highly Decorated Member Award 500 Likes Award

    Sparky Zettabyte Poster Moderator

    10,718
    543
    364
    Not sure why, just treat it as one of those "its what the user wants to do" and then try and find a fix for it even though there is an easy solution by using another cell! :biggrin
     
    Certifications: MSc MCSE MCSA:M MCSA:S MCITP:EA MCTS(x5) MS-900 AZ-900 Security+ Network+ A+
    WIP: Microsoft Certs
  6. asymvivastos

    asymvivastos New Member

    4
    0
    6
    First of all I want to thank all of you that answered to me and really helped me.:)

    ThomasMc I am going to test the code asap.

    And now why I want to use the same cell??Because I have been told so by the person that wants that excel book...:eek:

    He just want to look more "professional" lets say but if I see that I cannot do it I told him that I will do it with the easy way!!
     
  7. greenbrucelee
    Highly Decorated Member Award

    greenbrucelee Zettabyte Poster

    14,292
    265
    329
    thats how I would have done it. :D
     
    Certifications: A+, N+, MCDST, Security+, 70-270
    WIP: 70-620 or 70-680?
  8. r.h.lee

    r.h.lee Gigabyte Poster

    1,011
    52
    105
    asymvivastos,

    If you're looking for "more professional" then why not use a separate sheet, like sheet 2, to do the manual calculations such as "multiply by 12" then on the sheet 1 is where you'd have like a summary sheet of totals, averages, etc.
     
    Certifications: MCSE, MCP+I, MCP, CCNA, A+
    WIP: CCDA

Share This Page

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.