Microsoft Tech Community - Latest Blogs - Excel Blog

الاثنين، 31 يوليو 2023

Apply CHOOSE Function with Array to Return Multiple Values in Excel

 


Apply CHOOSE Function with Array to Return Multiple Values in Excel


Let’s say, we have a dataset (B4:D12) in Excel containing the Names of some students and their marks in Math and Physics. However, we need to pick a student’s Name along the marks in the two subjects. Here, we will use the CHOOSE function in Excel with the array to return these multiple values. By applying the formula of this method, we will always get the values in a row even if they are in a column. The steps are below.

Apply CHOOSE Function with Array to Return Multiple Values in Excel



Steps:

  • First, select cell B12.
  • After that, to get the values in a row, enter the formula below in the cell (B12):
=CHOOSE({1,2,3},B6,C6,D6)
  • Therefore, press the Enter key.
  • Thus, you will get the values in the range B12:D12 (see the picture below).

In the formula, the cells B6C6 & D6 denote the values to be returned. Again, {1,2,3} array refers to the positions of the values. So, {1,2,3} array is the index_num in this formula.

  • By applying this formula, we get the result in an array format.
  • If we select a value, then the other two values will automatically be selected (see screenshot).
  • To delete the entire array, you will need to select any one cell in the array (cell B12 in our case).
from https://www.exceldemy.com/

ليست هناك تعليقات:

إرسال تعليق