2015-11-30 63 views
-2

我目前面臨以下問題。Excel多功能

我想知道一個值是否與字段匹配。該字段包含以下信息:

2015年9月4日12:00:00 PM

月/日/年HH:mm:ss的

現在我想我的價值觀同場比較上文提到的。

My values are: Day and Month. 
    My idea is to create one term and just change the values in the term  
    every month (for the report). 

例如,

IF Month = 10 and Day = 27 write Yes in a field. If not write No. 

的問題是,一天或一個月可以有兩個或一個數字:

9/4/2015 12:00:00 PM 
10/25/2015 12:00:00 PM 
1/12/2015 12:00:00 PM 
12/1/2015 12:00:00 PM 

任何想法?

在此先感謝。

+4

使用天()月()函數? –

+1

或'= TEXT(A1,「mmdd」)=「1027」' – user3819867

回答

0

以下forumula會做不使用VBA,在A1的值與使用IFSUMPRODUCT特定的日期和月份:

=IF(SUMPRODUCT(--(MONTH(A1)=10);--(DAY(A1)=27));"Yes";"No")