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.

  • 相关阅读:
    编程思想之正则表达式
    SQL查询顺序
    hibernate inverse属性的作用
    介绍一下Hibernate的二级缓存
    JSON数据
    你没玩过的全新版本!Win10这些骚操作你知多少
    VSCode 小鸡汤 第01期
    Editor REST Client
    k8s常用命令
    【项目3-2】多肉植物网站
  • 原文地址:https://www.cnblogs.com/senion/p/2857925.html
Copyright © 2011-2022 走看看