+ Reply to Thread
Results 1 to 2 of 2

combining vlookup with if?

  1. #1
    Registered User
    Join Date
    03-29-2005
    Posts
    19

    combining vlookup with if?

    I am trying to write two formulas that say if col 1 ="e" and col 2>40 then
    count how many times that occurs (in this case 1 time). In another cell I'd like to write a similar formula that also says if col 1 ="e" and col 2>40 then average those numbers (in this case 65 b/c there is only one number). Any ideas?

    Col 1 Col 2
    e 23
    e 34
    k 25
    e 65
    r 56
    k 43
    k 45
    r 43
    r 22
    e 31

  2. #2
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    This formula should count the number that matches your criteria:

    =SUMPRODUCT((A1:A10="e")*(B1:B10>40))

    And this should give you the average of the results:

    =SUMPRODUCT((A1:A10="e")*(B1:B10>40)*(B1:B40))/SUMPRODUCT((A1:A10="e")*(B1:B10>40))

    HTH

    Jason

+ 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