LikeOffice.com

excel utility

Keep In Touch:
 contact us  facebook
 
Get HELP with your Excel Project:
 Excel Formula
 List of Excel Formula examples
 
Home >> Excel Formula >> Excel Formula

Sumproduct Lookup Sumif Countif Unique Percentile

 

1. Count based on 2 conditions using array formula    
2. Max based on 2 or more conditions using array formula    
3. Count based on all values that are higher then 30    
4. Count based on one condition with *    
5. Count based on one condition only    
6. Count how many time the range E12:F12 appears in Column A (rng_a)    
7. Count based on 2 or more conditions    
8. Count totals that are greater than 20 and less than 50    
9. Countifs with 2 or more conditions    
10. Hlookup based on one condition    
11. Returning the most Common text In A Range    
12. Returning a Reference to a Value - 1 area    
13. Returning a Reference to a Value - 2 areas    
14. VLookup with multiple conditions…    
15. Getting row of cell with maximum value    
16. Getting row that meet 2 or more conditions    
17. Vlookup based on one condition    
18. Vlookup based on one condition; dynamic column    
19. Vlookup based on two concatenated conditions    
20. Using INDEX and MATCH Against Multiple Criteria    
21. Using INDEX and MATCH Against Multiple Criteria (&)    
22. Return text value found most frequently in a column    
23. Return the sum of the highest 3 values in Column H (rng_h)    
24. Return the average of the highest 3 values in Column H (rng_h), rounding it to one digit    
25. Sum based on one Condition with * at the end    
26. Sum based on one Condition with * at the beginning    
27. Sum based on one Condition which is exactly 4 letters text    
28. Sum based on one Condition with * in another cell    
29. Sum based on one Condition which is higher than five (>5)    
30. Sumifs with 2 or more conditions    
31. Count based on 2 conditions using Sumproduct formula    
32. Count based on 2 or more conditions using sumproduct and +0    
33. Count based on 2 or more conditions using sumproduct and *1    
34. Count based on 2 or more conditions using sumproduct and --    
35. Count based on 2 or more conditions using sumproduct and *    
36. Count with Or Condition    
37. Count the number of characters in a range    
38. Count how many times a charcter in a range    
39. Sum based on two conditions    
40. Sum of 2 or more ranges using Sumproduct with + (plus) sign    
41. Sum of the difference of 2 ranges using Sumproduct with - (minus) sign    
42. Sumproduct with Or Condition    
43. Return the aggregate sum of column H minus column F    
44. Return the Sum based on 2 conditions, one in column and other in row    
45. Return the Sum based on 2 conditions, one of them is that left 4 letters are "Cola"    
46. Find the Last Item in an Excel List    
47. Return the product of 2 arrays, one of which is a binary value    
48. Count the number of "A"s, both upper and lower case    
49. Count unique values that appears more than 2 times    
50. Count unique items in a list    
51. Count unique items in a list with conditions [shelly]    
52. Count unique values that appears more than 2 times    
53. Count unique values that appears more than 2 times in column C and at least one time the value 'a' in column E    
54. Count unique values that appears more than 2 times    
55. Count unique items in a list    
56. Sum ONLY unique values    
57. Sum unique values    





1. Count based on 2 conditions using array formula

Count based on 2 conditions using array formula.


Array Formula:

{=SUM(IF((RNG_C=E12)*(RNG_E=F12),1))}

E12 = Cola2
F12 = b

Answer = 3

Top


2. Max based on 2 or more conditions using array formula

Max based on 2 or more conditions using array formula.


Array Formula:

{=MAX(IF((RNG_C=E12)*(RNG_E=F12),RNG_F,""))}

E12 = Cola2
F12 = a

Answer = 11

Top


3. Count based on all values that are higher then 30

Count based on all values that are higher then 30.


Formula:

=COUNTIF(RNG_H,">30")



Answer = 6

Top


4. Count based on one condition with *

Count based on one condition with *.


Formula:

=COUNTIF(RNG_C,E12&"*")

E12 = Col

Answer = 5

Top


5. Count based on one condition only

Count based on one condition only.


Formula:

=COUNTIF(RNG_C,E12)

E12 = Cola2

Answer = 4

Top


6. Count how many time the range E12:F12 appears in Column A (rng_a)

Count how many time the range E12:F12 appears in Column A (rng_a).


Array Formula:

{=SUM(COUNTIF(RNG_A,E12:F12))}

E12 = 312
F12 = 313

Answer = 4

Top


7. Count based on 2 or more conditions

Count based on 2 or more conditions.
The COUNTIFS function, similar to Excel's COUNTIF function, counts up the number of times data in two or more ranges of cells meets multiple criteria.

Formula:

=COUNTIFS(RNG_C,E12,RNG_E,F12)

E12 = Cola2
F12 = b

Answer = 3

Top


8. Count totals that are greater than 20 and less than 50

Count totals that are greater than 20 and less than 50.
The COUNTIFS function, similar to Excel's COUNTIF function, counts up the number of times data in two or more ranges of cells meets multiple criteria.

Formula:

=COUNTIFS(RNG_H,">20",RNG_H,"<50")



Answer = 4

Top


9. Countifs with 2 or more conditions

Countifs with 2 or more conditions.
The COUNTIFS function, similar to Excel's COUNTIF function, counts up the number of times data in two or more ranges of cells meets multiple criteria.

Formula:

=COUNTIFS(RNG_C,E12,RNG_E,F12)

E12 = cola2
F12 = b

Answer = 3

Top


10. Hlookup based on one condition

Hlookup based on one condition.


Formula:

=HLOOKUP(E12,$A$1:$H$10,7,0)

E12 = Agent

Answer = David

Top


11. Returning the most Common text In A Range

Returning the most Common text In A Range.


Array Formula:

{=INDEX(RNG_A,MATCH(MAX(COUNTIF(RNG_A,RNG_A)),COUNTIF(RNG_A,RNG_A)))}



Answer = 313

Top


12. Returning a Reference to a Value - 1 area

Returning a Reference to a Value - 1 area.


Formula:

=INDEX($A$2:$B$10, 2, 2)



Answer = 44

Top


13. Returning a Reference to a Value - 2 areas

Returning a Reference to a Value - 2 areas.


Formula:

=INDEX(($A$2:$B$10,$E$5:$H$8),2, 3,2)



Answer = 5

Top


14. VLookup with multiple conditions…

VLookup with multiple conditions….


Array Formula:

{=INDEX(RNG_A,MATCH(E12&F12,RNG_C&RNG_D,0))}

E12 = Pepsi
F12 = David

Answer = 316

Top


15. Getting row of cell with maximum value

Getting row of cell with maximum value.
Getting row of cell with maximum value.
This first picks the maximum value in col. H, so you can't have anything else in col. H besides your list of values you want to check at least nothing that would be a greater number than any of those values.
The MATCH function returns the relative position in col H of the maximum number, and that relative position is simply the row number.

Formula:

=MATCH(MAX(RNG_H),RNG_H,0)



Answer = 6

Top


16. Getting row that meet 2 or more conditions

Getting row that meet 2 or more conditions.
Getting row that meet 2 or more conditions.
This MATCH formula, as an ARRAY (CTRL-SHIFT-ENTER), return the row number once meet the following conditions:
It has 'a' in col. E and '11' in col. F
You can use concatenate (&) to add more conditions.

Array Formula:

{=MATCH(E12&F12,RNG_E&RNG_F,0)}

E12 = a
F12 = 11

Answer = 4

Top


17. Vlookup based on one condition

Vlookup based on one condition.
In this formula RNG defines as A2:H10

Formula:

=VLOOKUP(E12,RNG,3,0)

E12 = 316

Answer = Pepsi

Top


18. Vlookup based on one condition; dynamic column

Vlookup based on one condition; dynamic column.
In this formula RNG defines as A2:H10

Formula:

=VLOOKUP(E12,RNG,COLUMN(),0)

E12 = 316

Answer = David

Top


19. Vlookup based on two concatenated conditions

Vlookup based on two concatenated conditions.
In this formula RNG defines as A2:H10

Formula:

=VLOOKUP(VALUE(E12&F12),RNG,3,0)

E12 = 31
F12 = 3

Answer = Tempo

Top


20. Using INDEX and MATCH Against Multiple Criteria

Using INDEX and MATCH Against Multiple Criteria.


Array Formula:

{=INDEX(RNG_C,MATCH(E12,IF(RNG_B=F12,RNG_A),0))}

E12 = 316
F12 = 2

Answer = Pepsi

Top


21. Using INDEX and MATCH Against Multiple Criteria (&)

Using INDEX and MATCH Against Multiple Criteria (&).


Array Formula:

{=INDEX(RNG_C,MATCH(E12&F12,RNG_A&RNG_B,0))}

E12 = 316
F12 = 2

Answer = Pepsi

Top


22. Return text value found most frequently in a column

Return text value found most frequently in a column.
The MODE function, one of Excel's statistical functions, tells you the most frequently occurring value in a list of numbers.
The syntax for the MODE function is:
= MODE ( number1, number2, ... number255 ).

Array Formula:

{=INDEX(RNG_C,MODE(IF(RNG_C<>"",MATCH(RNG_C,RNG_C,0))))}



Answer = Cola2

Top


23. Return the sum of the highest 3 values in Column H (rng_h)

Return the sum of the highest 3 values in Column H (rng_h).
The Percentile function returns the nth percentile from a set of values.
The syntax for the Percentile function is:
Percentile( array, nth_percentile )
array is a range or array from which you want to return the nth percentile.
nth_percentile is the percentile value. It can be a value between 0 and 1.

Array Formula:

{=SUM(IF(RNG_H>PERCENTILE(RNG_H,(COUNT(RNG_H)-E12)/COUNT(RNG_H)),RNG_H))}

E12 = 3

Answer = 191

Top


24. Return the average of the highest 3 values in Column H (rng_h), rounding it to one digit

Return the average of the highest 3 values in Column H (rng_h), rounding it to one digit.
The Percentile function returns the nth percentile from a set of values.
The syntax for the Percentile function is:
Percentile( array, nth_percentile )
array is a range or array from which you want to return the nth percentile.
nth_percentile is the percentile value. It can be a value between 0 and 1.

Array Formula:

{=ROUND(AVERAGE(IF(RNG_H>PERCENTILE(RNG_H,(COUNT(RNG_H)-E12)/COUNT(RNG_H)),RNG_H)),1)}

E12 = 3

Answer = 63.7

Top


25. Sum based on one Condition with * at the end

Sum based on one Condition with * at the end.
It sums Column H based on every text that starts with 'Col'.

Formula:

=SUMIF(RNG_C,E12&"*",RNG_H)

E12 = Col

Answer = 128

Top


26. Sum based on one Condition with * at the beginning

Sum based on one Condition with * at the beginning.
It sums Column H based on every text that ends with 'o'.

Formula:

=SUMIF(RNG_C,"*"&E12,RNG_H)

E12 = o

Answer = 35

Top


27. Sum based on one Condition which is exactly 4 letters text

Sum based on one Condition which is exactly 4 letters text.
It sums Column H based on every text that has EXACTLY 4 letters.

Formula:

=SUMIF(RNG_D,E12,RNG_H)

E12 = ????

Answer = 123

Top


28. Sum based on one Condition with * in another cell

Sum based on one Condition with * in another cell.
It sums Column H based on every text that contains 'p' in it.

Formula:

=SUMIF(RNG_C,E12,RNG_H)

E12 = *p*

Answer = 226

Top


29. Sum based on one Condition which is higher than five (>5)

Sum based on one Condition which is higher than five (>5).


Formula:

=SUMIF(RNG_F,E12,RNG_H)

E12 = >5

Answer = 274

Top


30. Sumifs with 2 or more conditions

Sumifs with 2 or more conditions.
Excel 2007's SUMIFS function is similar to the SUMIF function except that it is used to add up data only if specific criteria are met in two or more ranges of cells.

Formula:

=SUMIFS(RNG_H,RNG_C,E12,RNG_E,F12)

E12 = cola2
F12 = b

Answer = 79

Top


31. Count based on 2 conditions using Sumproduct formula

Count based on 2 conditions using Sumproduct formula.


Formula:

=SUMPRODUCT((RNG_C=E12)*(RNG_E=F12))

E12 = Cola2
F12 = b

Answer = 3

Top


32. Count based on 2 or more conditions using sumproduct and +0

Count based on 2 or more conditions using sumproduct and +0.


Formula:

=SUMPRODUCT((RNG_A=E12)+0,(RNG_E=F12)+0)

E12 = 313
F12 = a

Answer = 1

Top


33. Count based on 2 or more conditions using sumproduct and *1

Count based on 2 or more conditions using sumproduct and *1.


Formula:

=SUMPRODUCT((RNG_A=E12)*1,(RNG_E=F12)*1)

E12 = 313
F12 = a

Answer = 1

Top


34. Count based on 2 or more conditions using sumproduct and --

Count based on 2 or more conditions using sumproduct and --.


Formula:

=SUMPRODUCT(--(RNG_A=E12),--(RNG_E=F12))

E12 = 313
F12 = a

Answer = 1

Top


35. Count based on 2 or more conditions using sumproduct and *

Count based on 2 or more conditions using sumproduct and *.


Formula:

=SUMPRODUCT((RNG_A=E12)*(RNG_E=F12))

E12 = 313
F12 = a

Answer = 1

Top


36. Count with Or Condition

Count with Or Condition.
This formula count anything in column C that equal to E12 plus anything in Column C that equal F12

Formula:

=SUMPRODUCT((RNG_C=E12)+(RNG_C=F12))

E12 = Cola2
F12 = Pepsi

Answer = 7

Top


37. Count the number of characters in a range

Count the number of characters in a range.
Return the number of characters in all values and text in Range D

Formula:

=SUMPRODUCT(LEN(RNG_D))



Answer = 43

Top


38. Count how many times a charcter in a range

Count how many times a charcter in a range.
Return the number of characters in all values and text in Range D. This is a case sensitive, meaning "d" and "D" is not the same.

Formula:

=SUMPRODUCT(LEN(RNG_D)-LEN(SUBSTITUTE(RNG_D,E12,""))/LEN(E12))

E12 = D

Answer = 4

Top


39. Sum based on two conditions

Sum based on two conditions.


Formula:

=SUMPRODUCT((RNG_C=E12)*(RNG_E=F12),RNG_H)

E12 = Cola2
F12 = b

Answer = 79

Top


40. Sum of 2 or more ranges using Sumproduct with + (plus) sign

Sum of 2 or more ranges using Sumproduct with + (plus) sign.


Formula:

=SUMPRODUCT((RNG_C=E12)+(RNG_E=F12),RNG_H)

E12 = Cola2
F12 = b

Answer = 202

Top


41. Sum of the difference of 2 ranges using Sumproduct with - (minus) sign

Sum of the difference of 2 ranges using Sumproduct with - (minus) sign.


Formula:

=SUMPRODUCT((RNG_C=E12)-(RNG_E=F12),RNG_H)

E12 = Cola2
F12 = b

Answer = 44

Top


42. Sumproduct with Or Condition

Sumproduct with Or Condition.


Formula:

=SUMPRODUCT((RNG_E=E12)+(RNG_E=F12),RNG_H)

E12 = b
F12 = c

Answer = 133

Top


43. Return the aggregate sum of column H minus column F

Return the aggregate sum of column H minus column F.


Formula:

=SUMPRODUCT((RNG_H-RNG_F))



Answer = 282

Top


44. Return the Sum based on 2 conditions, one in column and other in row

Return the Sum based on 2 conditions, one in column and other in row.
One condition is vertical and the other is horizontal. 2 Way Lookup to lookup value at the intersection corresponding to a given row & column values.

Formula:

=SUMPRODUCT((RNG_A=E12)*($A$1:$H$1=F12),$A$2:$H$10)

E12 = 316
F12 = Quantity

Answer = 25

Top


45. Return the Sum based on 2 conditions, one of them is that left 4 letters are "Cola"

Return the Sum based on 2 conditions, one of them is that left 4 letters are "Cola".


Formula:

=SUMPRODUCT((RNG_E=E12)*(LEFT(RNG_C,4)=F12),RNG_H)

E12 = a
F12 = Cola

Answer = 49

Top


46. Find the Last Item in an Excel List

Find the Last Item in an Excel List.


Formula:

=INDEX(RNG_D,SUMPRODUCT(MAX((RNG_B=E12)*ROW(RNG_D)))-ROW(RNG_D)+1)

E12 = 4

Answer = John

Top


47. Return the product of 2 arrays, one of which is a binary value

Return the product of 2 arrays, one of which is a binary value.
Return the product of 2 arrays, one of which is a binary value composed of 1 and 0 only.
The formula actually divides the binary value to 10 different values, each is 1 or 0.
What we get is: 1X5 + 0X12+0*27+1X44 and so on.

Formula:

=SUMPRODUCT((VALUE(MID(E12,ROW(RNG_H),1)))*(RNG_H))

E12 = 1001011001

Answer = 218

Top


48. Count the number of "A"s, both upper and lower case

Count the number of "A"s, both upper and lower case.


Formula:

=LEN(E12)-LEN(SUBSTITUTE(SUBSTITUTE(E12,"A",""),"a",""))

E12 = abcbCAa

Answer = 3

Top


49. Count unique values that appears more than 2 times

Count unique values that appears more than 2 times.


Array Formula:

{=SUM(IF(FREQUENCY(IF(RNG_C<>"",MATCH(RNG_C,RNG_C,0)),ROW(RNG_C)-ROW($C$1)+1)>2,1))}



Answer = 2

Top


50. Count unique items in a list

Count unique items in a list.


Array Formula:

{=SUM(IF(FREQUENCY(IF(LEN(RNG_C)>0,MATCH(RNG_C,RNG_C,0),""), IF(LEN(RNG_C)>0,MATCH(RNG_C,RNG_C,0),""))>0,1))}



Answer = 4

Top


51. Count unique items in a list with conditions [shelly]

Count unique items in a list with conditions [shelly].
It counts how many unique items are in 'Column C' subject to the conditions that there is 'b' in Column D.

Formula:

=SUMPRODUCT(((RNG_C<>"")/COUNTIF(RNG_C,RNG_C&""))*ISNUMBER(MATCH(RNG_C&E12,RNG_C&RNG_E,0)))

E12 = b

Answer = 1

Top


52. Count unique values that appears more than 2 times

Count unique values that appears more than 2 times.


Formula:

=SUMPRODUCT((RNG_C<>"")/COUNTIF(RNG_C,RNG_C&"")*(COUNTIF(RNG_C,RNG_C)>2))



Answer = 2

Top


53. Count unique values that appears more than 2 times in column C and at least one time the value 'a' in column E

Count unique values that appears more than 2 times in column C and at least one time the value 'a' in column E.


Formula:

=SUMPRODUCT(((RNG_C<>"")/COUNTIF(RNG_C,RNG_C&""))*(COUNTIF(RNG_C,RNG_C)>2)*ISNUMBER(MATCH(RNG_C&E12,RNG_C&RNG_E,0)))

E12 = a

Answer = 2

Top


54. Count unique values that appears more than 2 times

Count unique values that appears more than 2 times.


Formula:

=SUMPRODUCT(--(RNG_C<>""),--(COUNTIF(RNG_C,RNG_C)>2),--(MATCH(RNG_C&"",RNG_C&"",0)=ROW(RNG_C)-ROW($C$2)+1))



Answer = 2

Top


55. Count unique items in a list

Count unique items in a list.
It counts how many unique items are in 'Column C'

Formula:

=SUMPRODUCT(((RNG_C<>"")/COUNTIF(RNG_C,RNG_C&"")))



Answer = 4

Top


56. Sum ONLY unique values

Sum ONLY unique values.
It sum up only the cells tha appear one time in a list

Array Formula:

{=SUM(IF(COUNTIF(RNG_F, RNG_F)=1, RNG_F, ""))}



Answer = 45

Top


57. Sum unique values

Sum unique values.
It sum up all unique values in a list. If a value appear more than once then it takes it one time only.

Array Formula:

{=SUM(IF(IF(MATCH(RNG_F, RNG_F, 0)=(ROW(RNG_F)-ROW(F1048518)+1), (ROW(RNG_F)-ROW(F1048518)+1), 0)<>0, RNG_F, ""))}



Answer = 0

Top

 




                  

Microsoft® and Microsoft Excel® are registered trademarks of Microsoft Corporation.
©2003-2013 LikeOffice - Privacy Policy - Contact us