+ Reply to Thread
Results 1 to 2 of 2

counif v sumproduct

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    12-16-2006
    Posts
    349

    Question counif v sumproduct

    is there any differnce in countif and sumproduct ?

    also can anyone help in simplyfying the code below

    ActiveCell.Offset(0, 2).Range("A1").Select
    Selection.FormulaArray = _
    "=SUM(IF('[manuCSCBTB1.xls]1'!R2C9:R1000C9=""timothyHINCHEY"",IF('[manuCSCBTB1.xls]1'!R2C5:R1000C5=""RE-WORK"",1,0),0))"
    ActiveCell.Offset(0, 1).Range("A1").Select
    Selection.FormulaArray = _
    "=SUM(IF('[manuCSCBTB1.xls]1'!R2C9:R1000C9=""timothyHINCHEY"",IF('[manuCSCBTB1.xls]1'!R2C5:R1000C5=""NO CALLS"",1,0),0))"
    ActiveCell.Offset(0, 1).Range("A1").Select
    Selection.FormulaArray = _
    "=SUM(IF('[manuCSCBTB1.xls]1'!R2C9:R1000C9=""timothyHINCHEY"",IF('[manuCSCBTB1.xls]1'!R2C5:R1000C5=""SECONDMENT"",1,0),0))"
    ActiveCell.Offset(0, 1).Range("A1").Select
    Selection.FormulaArray = _
    "=SUM(IF('[manuCSCBTB1.xls]1'!R2C9:R1000C9=""timothyHINCHEY"",IF('[manuCSCBTB1.xls]1'!R2C5:R1000C5=""HOLIDAY"",1,0),0))"
    ActiveCell.Offset(0, 1).Range("A1").Select
    Selection.FormulaArray = _
    "=SUM(IF('[manuCSCBTB1.xls]1'!R2C9:R1000C9=""timothyHINCHEY"",IF('[manuCSCBTB1.xls]1'!R2C5:R1000C5=""OBJECTIVE FREE"",1,0),0))"
    ActiveCell.Offset(0, 1).Range("A1").Select
    Selection.FormulaArray = _
    "=SUM(IF('[manuCSCBTB1.xls]1'!R2C9:R1000C9=""timothyHINCHEY"",IF('[manuCSCBTB1.xls]1'!R2C5:R1000C5=""MATERNITY"",1,0),0))"
    ActiveCell.Offset(0, 1).Range("A1").Select
    Selection.FormulaArray = _
    "=SUM(IF('[manuCSCBTB1.xls]1'!R2C9:R1000C9=""timothyHINCHEY"",IF('[manuCSCBTB1.xls]1'!R2C5:R1000C5=""LEFT"",1,0),0))"
    ActiveCell.Offset(0, 1).Range("A1").Select
    Selection.FormulaArray = _
    "=SUM(IF('[manuCSCBTB1.xls]1'!R2C9:R1000C9=""timothyHINCHEY"",IF('[manuCSCBTB1.xls]1'!R2C5:R1000C5=""ILL"",1,0),0))"
    ActiveCell.Offset(0, 1).Range("A1").Select
    Selection.FormulaArray = _
    "=SUM(IF('[manuCSCBTB1.xls]1'!R2C9:R1000C9=""timothyHINCHEY"",IF('[manuCSCBTB1.xls]1'!R2C5:R1000C5=""OTHER"",1,0),0))"

    ActiveCell.Offset(0, 6).Range("A1").Select
    Selection.FormulaArray = _
    "=SUM(IF('[manuCSCBTB1.xls]1'!R2C9:R1000C9=""timothyHINCHEY"",IF('[manuCSCBTB1.xls]1'!R2C11:R1000C11=""Y"",1,0),0))"

    ActiveCell.Offset(0, 8).Range("A1").Select
    ActiveCell.FormulaR1C1 = "manuCSCBTB1.xls"

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Information about Sumproduct

    http://www.xldynamic.com/source/xld....T.html#classic

+ 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