Try   HackMD

Excel必學的查表公式_Match+Offset

LHB阿好伯, Sep 24, 2019

tags: Excel

Excel必學的查表公式_Match+Index_深入教學中我介紹到利用Match+Index的組合公式

建議先看過上一篇文章不然可能看不懂這一篇

可以判斷出要找的目標在表格內相對應的資料位置並回傳
而今天將來講解一個公式 Offset()
它的作用與 Index() 相同
都是利用Match先將所需資料的儲存格位置找出來再回傳儲存格內容
然而 Index() 只能回傳單一儲存格
利用 Offset 就回傳附近的資料並且擁有更多彈性

兩個函數的差異

INDEX(儲存格範圍或常數陣列, 回傳列數, [回傳欄數])
OFFSET(起始參照, 移動列數, 移動欄數, [回傳高度], [回傳寬度])

用一個簡單的動畫來呈現可以看到Offset的作用與Index相近

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

然而選擇後面給予[回傳高度], [回傳寬度]參數後會儲存格會出現######
這其實並不是出函數問題
在EXCEL中出現眾多####表示無法顯示儲存格內的資料
而是這邊的問題一樣
因為給予高度或寬度回傳其他儲存格而無法在單一儲存格中顯示

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

這時候在Excel中就有一名叫陣列公式的方式可以處理這問題
先圈選你要回傳的高度或寬度的儲存格範圍
並點選公式輸入的地方按下鍵盤中Ctrl + Shift + Enter的組合鍵
這樣就可以正常顯示
相同的寬度也是一樣的方式

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

然而在回傳的陣列也是可以做一些計算的
例如SUM()、AVERAGE()、STDEV.S()等對單純數據加減乘除的函數

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Offset可以取代Index的所有功能並能有更多的可能
今天也是大略的講解一下希望大家喜歡
若想學習到更多函數推薦可以參考
Excel 公式+函數職場專用超級辭典: 新人、老鳥到大師級都需要的速查指引
http://bit.ly/2BmyBC7

全文分享至

https://www.facebook.com/LHB0222/

有疑問想討論的都歡迎於下方留言

喜歡的幫我分享給所有的朋友 \o/

有所錯誤歡迎指教

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →