开发者

In Excel, how to find value against a date

开发者 https://www.devze.com 2023-02-08 10:09 出处:网络
In Excel, say, I have a series of dates in column A, and some values in column B. In a diff开发者_如何学Goerent cell I want to grab the value from column B for that row where column A has a specific

In Excel, say, I have a series of dates in column A, and some values in column B.

In a diff开发者_如何学Goerent cell I want to grab the value from column B for that row where column A has a specific date (I can specific the date in my formula).

What formula should I use?

Thanks


Will all the dates be unique? If so, you could use SUMIF. Something like this:

=SUMIF(A1:A10,"the date I want",B1:B10)


You are looking for this:

=VLOOKUP(lookup_value,table_array,col_index_num,range_lookup)

lookup_value is the date you want to find, table_array should include columns A and B, col_index_num is the column you want to get (in this case, 2 for column B) and range_lookup is FALSE, since you seem to want an exact match:

Try this, for example (the date to look for should be put on C1, dates on A and values on B):

=VLOOKUP(C1, $A$1:$B$100, 2, FALSE)
0

精彩评论

暂无评论...
验证码 换一张
取 消