简体   繁体   English

VLOOKUP 检索今天月份和年份下的数据

[英]VLOOKUP retrieving data under today's month and year

So my problem is that I cannot figure out how to use VLOOKUP to get data under today's month and year.所以我的问题是我无法弄清楚如何使用 VLOOKUP 来获取今天月份和年份下的数据。

在此处输入图像描述

So as seen in the pic, I have data under every month of multiple years and I need to look up the data under today's month and year and input it into my designated cell.因此,如图所示,我在多年的每个月下都有数据,我需要查找今天月份和年份下的数据并将其输入到我指定的单元格中。

I tried this formula among many others with the same concept but it didn't work:我在许多其他具有相同概念的公式中尝试了这个公式,但它没有用:

=VLOOKUP(sheet2!C9;sheet2!B6:AD16;MATCH(TEXT(TODAY();"MMYYYY");Sheet2!E8:AD8;0);FALSE)

I would appreciate your help!感谢您的帮助!

I think that the HLOOKUP function is probably called for here:我认为 HLOOKUP HLOOKUP可能在这里被调用:

=HLOOKUP(TEXT(TODAY(), "MMM-YY"), Sheet2!B6:AD16, 2, FALSE)

在此处输入图像描述

I'm also not sure about using semicolons in formulas like you've done.我也不确定是否像您所做的那样在公式中使用分号。 At any rate, HLOOKUP is more appropriate in this situation.无论如何, HLOOKUP更适合这种情况。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM