HLOOKUP.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <?php
  2. function orderGrid(): array
  3. {
  4. return [
  5. ['Order ID', 10247, 10249, 10250, 10251, 10252, 10253],
  6. ['Unit Price', 14.00, 18.60, 7.70, 16.80, 16.80, 64.80],
  7. ['Quantity', 12, 9, 10, 6, 20, 40],
  8. ];
  9. }
  10. function partsGrid(): array
  11. {
  12. return [
  13. ['Axles', 'Bearings', 'Bolts'],
  14. [4, 4, 9],
  15. [5, 7, 10],
  16. [6, 8, 11],
  17. ];
  18. }
  19. return [
  20. [
  21. 16.80,
  22. 10251,
  23. orderGrid(),
  24. 2,
  25. false,
  26. ],
  27. [
  28. 6.0,
  29. 10251,
  30. orderGrid(),
  31. 3,
  32. false,
  33. ],
  34. [
  35. '#N/A',
  36. 10248,
  37. orderGrid(),
  38. 2,
  39. false,
  40. ],
  41. [
  42. 14.0,
  43. 10248,
  44. orderGrid(),
  45. 2,
  46. true,
  47. ],
  48. [
  49. 4,
  50. 'Axles',
  51. partsGrid(),
  52. 2,
  53. true,
  54. ],
  55. [
  56. 7,
  57. 'Bearings',
  58. partsGrid(),
  59. 3,
  60. false,
  61. ],
  62. [
  63. 5,
  64. 'B',
  65. partsGrid(),
  66. 3,
  67. true,
  68. ],
  69. [
  70. 5,
  71. 'B',
  72. partsGrid(),
  73. 3,
  74. null,
  75. ],
  76. [
  77. 11,
  78. 'Bolts',
  79. partsGrid(),
  80. 4,
  81. ],
  82. [
  83. 'c',
  84. 3,
  85. [
  86. [1, 2, 3],
  87. ['a', 'b', 'c'],
  88. ['d', 'e', 'f'],
  89. ],
  90. 2,
  91. true,
  92. ],
  93. [
  94. 3,
  95. 3,
  96. [
  97. [1, 2, 3],
  98. ],
  99. 1,
  100. true,
  101. ],
  102. [
  103. 5,
  104. 'x',
  105. [
  106. ['Selection column', '0', '0', '0', '0', 'x', 'x', 'x', 'x', 'x'],
  107. ['Value to retrieve', 1, 2, 3, 4, 5, 6, 7, 8, 9],
  108. ],
  109. 2,
  110. false,
  111. ],
  112. [
  113. 2,
  114. 'B',
  115. [
  116. ['Selection column', 'C', 'B', 'A'],
  117. ['Value to retrieve', 3, 2, 1],
  118. ],
  119. 2,
  120. false,
  121. ],
  122. [
  123. '#VALUE!',
  124. 'B',
  125. [
  126. ['Selection column', 'C', 'B', 'A'],
  127. ['Value to retrieve', 3, 2, 1],
  128. ],
  129. 'Nan',
  130. false,
  131. ],
  132. [
  133. '#N/A',
  134. 'B',
  135. [
  136. 'Selection column',
  137. 'Value to retrieve',
  138. ],
  139. 2,
  140. false,
  141. ],
  142. [
  143. '#REF!',
  144. 'Selection column',
  145. [
  146. 'Selection column',
  147. 'Value to retrieve',
  148. ],
  149. 5,
  150. false,
  151. ],
  152. [
  153. 'Selection column',
  154. 'Selection column',
  155. [
  156. 'Selection column',
  157. 'Value to retrieve',
  158. ],
  159. 1,
  160. false,
  161. ],
  162. [
  163. 0.61,
  164. 'Ed',
  165. [
  166. [null, 'Ann', 'Cara', 'Colin', 'Ed', 'Frank'],
  167. ['Math', 0.58, 0.90, 0.67, 0.76, 0.80],
  168. ['French', 0.61, 0.71, 0.59, 0.59, 0.76],
  169. ['Physics', 0.75, 0.45, 0.39, 0.52, 0.69],
  170. ['Bioogy', 0.39, 0.55, 0.77, 0.61, 0.45],
  171. ],
  172. 5,
  173. false,
  174. ],
  175. [
  176. 'Normal Weight',
  177. 23.5,
  178. [
  179. [null, 'Min', 0.0, 18.5, 25.0, 30.0],
  180. ['BMI', 'Max', 18.4, 24.9, 29.9, null],
  181. [null, 'Body Type', 'Underweight', 'Normal Weight', 'Overweight', 'Obese'],
  182. ],
  183. 3,
  184. true,
  185. ],
  186. 'issue2934' => [
  187. 'Red',
  188. 102,
  189. [
  190. [null, 102],
  191. [null, 'Red'],
  192. ],
  193. 2,
  194. false,
  195. ],
  196. ];