SUMIF.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <?php
  2. return [
  3. [
  4. 15,
  5. [
  6. [1],
  7. [5],
  8. [10],
  9. ],
  10. '>=5',
  11. ],
  12. [
  13. 10,
  14. [
  15. ['text'],
  16. [2],
  17. ],
  18. 'text',
  19. [
  20. [10],
  21. [100],
  22. ],
  23. ],
  24. [
  25. 10, // fixed by PR #2561
  26. [
  27. ['"text with quotes"'],
  28. [2],
  29. ],
  30. '"text with quotes"',
  31. [
  32. [10],
  33. [100],
  34. ],
  35. ],
  36. [
  37. 10,
  38. [
  39. ['"text with quotes"'],
  40. [''],
  41. ],
  42. '>"', // Compare to the single character " (double quote)
  43. [
  44. [10],
  45. [100],
  46. ],
  47. ],
  48. [
  49. 100,
  50. [
  51. [''],
  52. ['anything'],
  53. ],
  54. '>"', // Compare to the single character " (double quote)
  55. [
  56. [10],
  57. [100],
  58. ],
  59. ],
  60. [
  61. 10,
  62. [
  63. [1],
  64. [2],
  65. ],
  66. '<>', // any content
  67. [
  68. ['non-numeric value'], // ignored in SUM
  69. [10],
  70. ],
  71. ],
  72. [
  73. 100,
  74. [
  75. ['0'],
  76. ['some text'],
  77. ],
  78. 0, // Compare integer with string
  79. [
  80. [100],
  81. [1],
  82. ],
  83. ],
  84. [
  85. 100,
  86. [
  87. [0],
  88. ['some text'],
  89. ],
  90. 0, // Compare integer with integer
  91. [
  92. [100],
  93. [1],
  94. ],
  95. ],
  96. [
  97. 3,
  98. [
  99. [1],
  100. [0],
  101. [1],
  102. ],
  103. 1,
  104. [
  105. [3],
  106. [4], // less elements in sum array
  107. ],
  108. ],
  109. [
  110. 3,
  111. [
  112. [1],
  113. [0], // less elements in condition array
  114. ],
  115. 1,
  116. [
  117. [3],
  118. [4],
  119. [5],
  120. ],
  121. ],
  122. [
  123. 157559,
  124. [['Jan'], ['Jan'], ['Jan'], ['Jan'], ['Feb'], ['Feb'], ['Feb'], ['Feb']],
  125. 'Feb',
  126. [[36693], [22100], [53321], [34440], [29889], [50090], [32080], [45500]],
  127. ],
  128. [
  129. 66582,
  130. [['North 1'], ['North 2'], ['South 1'], ['South 2'], ['North 1'], ['North 2'], ['South 1'], ['South 2']],
  131. 'North 1',
  132. [[36693], [22100], [53321], [34440], [29889], [50090], [32080], [45500]],
  133. ],
  134. [
  135. 138772,
  136. [['North 1'], ['North 2'], ['South 1'], ['South 2'], ['North 1'], ['North 2'], ['South 1'], ['South 2']],
  137. 'North ?',
  138. [[36693], [22100], [53321], [34440], [29889], [50090], [32080], [45500]],
  139. ],
  140. [
  141. '#DIV/0!',
  142. [['North 1'], ['North 2'], ['South 1'], ['South 2'], ['North 1'], ['North 2'], ['South 1'], ['South 2']],
  143. 'North ?',
  144. [['=3/0'], [22100], [53321], [34440], [29889], [50090], [32080], [45500]],
  145. ],
  146. [
  147. 138772,
  148. [['North 1'], ['North 2'], ['South 1'], ['South 2'], ['North 1'], ['North 2'], ['South 1'], ['South 2']],
  149. 'North ?',
  150. [[36693], [22100], ['=3/0'], [34440], [29889], [50090], [32080], [45500]],
  151. ],
  152. [
  153. 23,
  154. [['n'], [''], ['y'], [''], ['n'], ['n'], ['n'], [''], []],
  155. '',
  156. [[1], [2], [3], [4], [5], [6], [7], [8], [9]],
  157. ],
  158. [
  159. 0,
  160. [['n'], [''], ['y'], [''], ['n'], ['n'], ['n'], [''], []],
  161. null,
  162. [[1], [2], [3], [4], [5], [6], [7], [8], [9]],
  163. ],
  164. [
  165. 19,
  166. [['n'], [''], ['y'], [''], ['n'], ['n'], ['n'], [''], []],
  167. 'n',
  168. [[1], [2], [3], [4], [5], [6], [7], [8], [9]],
  169. ],
  170. [
  171. 2,
  172. [
  173. [null],
  174. ['abc123fff'],
  175. ],
  176. 'abc123*',
  177. [
  178. [1],
  179. [2],
  180. ],
  181. ],
  182. ];