简体   繁体   中英

Return one cell value based on month in another cell

  I have 3 cells
    A1=5
    A2=7
    A3= 15/01/2015
    C1 = empty cell

what I need to show in the empty cell (C1) is : if the month in A3 is Jan ... then return A1 value (5) but if the month in A3 is Feb ... then return A2 value (7)

Thanks in advance for the answers

不考虑其他月份:

=IF(MONTH(A3)=1,A1,IF(MONTH(A3)=2,A2))

应该这样做:

C1 = IF(MONTH(A3) = 1, A1, A2)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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