跳到主要內容

如何在兩個日期之間進行vlookup並在Excel中返回相應的值?

假設您有一些項目進度的報告,現在,您想要獲取在時間表的兩個給定日期之間的給定時間的特定項目。 以以下屏幕截圖數據為例,我想查找給定的日期12/1/2019,如果該日期介於報告中的開始日期和結束日期之間,則返回其對應的項目名稱。 本文中,我將介紹LOOKUP函數來解決此問題。

兩個日期之間的Vlookup並使用公式返回相應的值

兩個日期之間的Vlookup並以驚人的功能返回相應的值


兩個日期之間的Vlookup並使用公式返回相應的值

若要獲取日期介於兩個日期之間的相對值,下面的“查找”公式可能會對您有所幫助。 請這樣做:

1。 在要放置結果的空白單元格中輸入以下公式:

=LOOKUP(2,1/($B$2:$B$8<=E2)/($C$2:$C$8>=E2),$A$2:$A$8)

備註:在上述形式中:

  • B2:B8 是開始日期的範圍, C2:C8 是表格中的結束日期範圍;
  • E2 是要獲取其對應值的給定日期。

2。 然後,將填充手柄向下拖動到單元格以獲得所需的結果。 看截圖:

筆記:

  • 如果日期不存在,則鍵入此公式後,您將得到一個錯誤值。
  • 這是另一個可以幫助您的簡單公式:=LOOKUP(E2,$B$2:$C$8,$A$2:$A$8).

兩個日期或兩個值之間的Vlookup並在Excel中返回相應的記錄

Excel的Kutools's 在兩個值之間查找 實用程序可幫助您根據給定的日期或值快速輕鬆地進行vlookup並返回相應的記錄。 點擊下載Kutools for Excel!

Excel的Kutools:擁有 300 多個方便的 Excel 插件,30 天內免費試用,無限制。 立即下載並免費試用!


兩個日期之間的Vlookup並以驚人的功能返回相應的值

如果您不想改變這些痛苦的公式, Excel的Kutools's 在兩個值之間查找 功能可以幫助您根據需要盡快解決此工作。

提示:要應用此 在兩個值之間查找 功能,首先,您應該下載 Excel的Kutools,然後快速輕鬆地應用該功能。

安裝後 Excel的Kutools,請這樣做:

1。 點擊 庫工具 > 超級查詢 > 在兩個值之間查找,請參見屏幕截圖:

2。 在 在兩個值之間查找 對話框,請執行以下操作:

  • 從中選擇查找值單元格和輸出單元格 查找值和輸出範圍 部分;
  • 然後,從 數據范圍 部分。

3。 然後,點擊 OK 按鈕,已提取基於給定日期的匹配記錄,如以下屏幕截圖所示:

備註:如果要在日期不存在時用其他特定文本替換錯誤值,請檢查 將#N / A錯誤值替換為指定值 選項。

點擊下載Kutools for Excel並立即免費試用!


更多相關文章:

  • 跨多個工作表的Vlookup值
  • 在excel中,我們可以輕鬆地應用vlookup函數在工作表的單個表中返回匹配值。 但是,您是否曾經考慮過如何在多個工作表中實現vlookup價值? 假設我有以下三個具有數據范圍的工作表,現在,我想根據這三個工作表中的條件來獲取相應值的一部分。
  • 在Excel中使用Vlookup精確匹配和近似匹配
  • 在Excel中,vlookup是最重要的功能之一,對我們而言,它是在表的最左列中搜索值並在範圍的同一行中返回該值。 但是,您是否在Excel中成功應用了vlookup函數? 本文,我將討論如何在Excel中使用vlookup函數。
  • Vlookup在Excel中從下到上的匹配值
  • 通常,Vlookup函數可以幫助您從上到下查找數據,以從列表中獲取第一個匹配值。 但是,有時候,您需要從下到上進行vlookup提取最後一個對應的值。 您有什麼好主意可以在Excel中處理此任務嗎?
  • 在Excel中從右到左的Vlookup值
  • Vlookup是Excel中的一個有用函數,我們可以使用它來快速返回表中最左列的相應數據。 但是,如果要在任何其他列中查找特定值並將相對值返回到左側,則正常的vlookup函數將不起作用。 在這裡,我可以向您介紹其他公式來解決此問題。

最佳辦公生產力工具

🤖 Kutools 人工智慧助手:基於以下內容徹底改變數據分析: 智慧執行   |  生成代碼  |  建立自訂公式  |  分析數據並產生圖表  |  呼叫 Kutools 函數...
熱門特色: 尋找、突出顯示或識別重複項   |  刪除空白行   |  合併列或儲存格而不遺失數據   |   沒有公式的回合 ...
超級查詢: 多條件VLookup    多值VLookup  |   跨多個工作表的 VLookup   |   模糊查詢 ....
高級下拉列表: 快速建立下拉列表   |  依賴下拉列表   |  多選下拉列表 ....
欄目經理: 新增特定數量的列  |  移動列  |  切換隱藏列的可見性狀態  |  比較範圍和列 ...
特色功能: 網格焦點   |  設計圖   |   大方程式酒吧    工作簿和工作表管理器   |  資源庫 (自動文字)   |  日期選擇器   |  合併工作表   |  加密/解密單元格    按清單發送電子郵件   |  超級濾鏡   |   特殊過濾器 (過濾粗體/斜體/刪除線...)...
前 15 個工具集12 文本 工具 (添加文本, 刪除字符,...)   |   50+ 圖表 類型 (甘特圖,...)   |   40+ 實用 公式 (根據生日計算年齡,...)   |   19 插入 工具 (插入二維碼, 從路徑插入圖片,...)   |   12 轉化 工具 (數字到單詞, 貨幣兌換,...)   |   7 合併與拆分 工具 (高級合併行, 分裂細胞,...)   |   ... 和更多

使用 Kutools for Excel 增強您的 Excel 技能,體驗前所未有的效率。 Kutools for Excel 提供了 300 多種進階功能來提高生產力並節省時間。  點擊此處獲取您最需要的功能...

產品描述


Office選項卡為Office帶來了選項卡式界面,使您的工作更加輕鬆

  • 在Word,Excel,PowerPoint中啟用選項卡式編輯和閱讀,發布者,Access,Visio和Project。
  • 在同一窗口的新選項卡中而不是在新窗口中打開並創建多個文檔。
  • 將您的工作效率提高 50%,每天為您減少數百次鼠標點擊!
Comments (31)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
May i know how to apply in multiple condition, for employee leave record.
Employee Number Leave Type Start Date End Date
11 AL 01dec23 11jan24
22 SL 11Jan24 12Jan24
11 SL 12JAn24 14Jan24
22 SL 14jan24 14jan24
This comment was minimized by the moderator on the site
What if I have start dates and end dates for multiple projects that are being down simultaneously by different workers? How can I use the date and project to get the name of the worker?
This comment was minimized by the moderator on the site
LOOKUP(2,1/($A$2:$A$7<=F1)/($B$2:$B$7>=F1),$C$2:$C$7)
This comment was minimized by the moderator on the site
SHARVAN FOLLOW MWE


INSTA ID -SHARVAN.MANDAL93
This comment was minimized by the moderator on the site
suppose x employee OT done in jan-22 & claim in feb-22, again in mar-22 try to claim ot agst jan-22, then how to track/stop claim twice/double OT date in excel by manually
This comment was minimized by the moderator on the site
Thanks! Helped me a lot! Except the formula should be
=LOOKUP(1,1/($B$2:$B$8<=E2)/($C$2:$C$8>=E2),$A$2:$A$8)   (and not =LOOKUP(2,.....)As you are looking for a match with 1 instead of 2! (1/True(1)/True(1) = 1)
This comment was minimized by the moderator on the site
It is very helpful for me...Thanks a lot.....
This comment was minimized by the moderator on the site
Thank you very much, very helpful and clear instructions!!!
This comment was minimized by the moderator on the site
Same here, still finding the way to retrieve more than one value, Did you find the solution?

Thank you for your time!
This comment was minimized by the moderator on the site
dear, I need help. For Example, IF we have many entries against value "A" than how I can pick the latest date value using the formula in excel. and if I have many entries of different values how I can pick the latest date value. (Sorry For My English)
This comment was minimized by the moderator on the site
I have something similiar to this! Have you had any luck anywhere?
This comment was minimized by the moderator on the site
Same here , still finding the way to retrive more than one value, Did you find the solution ?

Thank you for your time!
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations