zoukankan      html  css  js  c++  java
  • Excel Index Match 用法

    INDEX / MATCH -- Example 4

    Instead of matching information in column headings, you may need to match information that's stored in the columns, as shown in the table below.

     
    A
    B
    C
    D
    1
    Code
    Item
    Size
    Price
    2
    SW001
    Sweater
    Small
    10
    3
    JK001
    Jacket
    Small
    30
    4
    PN001
    Pants
    Small
    25
    5
    SW002
    Sweater
    Med
    12
    6
    JK002
    Jacket
    Med
    35
    7
    PN002
    Pants
    Med
    30
    8
    SW003
    Sweater
    Large
    14
    9
    JK003
    Jacket
    Large
    40
    10
    PN003
    Pants
    Large
    35
    11        
    12 Item Size Price Code
    13 Jacket Med
    ?
    ?

    In this INDEX / MATCH example, instead of columns headings of Small, Med, and Large, the size is stored in column C.

    You need to find the price from column D, when Jacket is in column B, and Med is in column C.

    1. Set up the worksheet as shown at right
    2. Enter the following formula in cell C13:      
      =INDEX($D$2:$D$10,MATCH(1,(A13=$B$2:$B$10)*(B13=$C$2:$C$10),0))
    3. This is an array formula, so hold Ctrl + Shift, and press the Enter key to see the result.

    Curly brackets will be automatically added to the formula (don't type them yourself!), so the final result will look like this:

    {=INDEX($D$2:$D$10,MATCH(1,(A13=$B$2:$B$10)*(B13=$C$2:$C$10),0))}

    Next, create a similar INDEX/MATCH formula in cell D13, to get the correct code from column A.

  • 相关阅读:
    90. 子集 II 回溯算法
    47. 全排列 II 回溯算法
    40. 组合总和 II
    39. 组合总和 回溯
    NLP 第八课 语言技术-文本与LDA主题模型
    36. 有效的数独
    31. 下一个排列
    HDU 4527
    HDU 4521
    HDU 5191
  • 原文地址:https://www.cnblogs.com/senion/p/2857925.html
Copyright © 2011-2022 走看看