Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jul 2002
    Location
    Ankeny, Iowa, USA
    Posts
    344
    Thanks
    8
    Thanked 0 Times in 0 Posts

    SUMIF in Macro (Excel 2002)

    Hi!
    I've tried the following code and I can't get it to work... any help with what I screwed up would be awesome.
    Thanks!
    Lana

    Sub SUM()
    Range("T2") = Application.WorksheetFunction.SUMIF("P2:P65536")," 84",("G2:G65536)
    End Sub

  2. #2
    5 Star Lounger
    Join Date
    Aug 2004
    Location
    Connecticut, USA
    Posts
    816
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SUMIF in Macro (Excel 2002)

    Change Range("T2") = Application.WorksheetFunction.SUMIF("P2:P65536")," 84",("G2:G65536)
    to
    Range("T2") = Application.WorksheetFunction.SUMIF(range("P2:P655 36"),"84",range("G2:G65536"))

  3. #3
    3 Star Lounger
    Join Date
    Jul 2002
    Location
    Ankeny, Iowa, USA
    Posts
    344
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Re: SUMIF in Macro (Excel 2002)

    That works perfect! I was totally excited that I was even remotely close to getting it right... I'm still learning!!
    Thanks a bunch... I appreciate the help!
    Lana

Posting Permissions

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