• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Formula execution on a true if statement

I am trying to have a cell look at another cell with a date in them (i.e. 12/15/2011) and return only the 3 letter Month but only if there is a date in the cell. I tried the below formula which doesn't work:

=IF(C5>1,=TEXT(DATE(YEAR(C5), MONTH(C5), DAY(C5))," MMM")," ")

If I just do the =TEXT(DATE(YEAR(C111), MONTH(C111), DAY(C111))," MMM") then it returns the Month but in cells where there is no date in it it defaults to "JAN" and for cells with no date in C:C column I want it to show nothing.

Can anyone please help? You guys are so awesome and have helped me with so many complex problems :) I so appreciate everyone. :)

Thank you & Regards,
~D.
 
Hi ,

Someone else will help out as far as your question is concerned ; I am more concerned with why you are using a formula such as :

=TEXT(DATE(YEAR(C5), MONTH(C5), DAY(C5))," MMM")

Surely , this can be replaced by :

=TEXT(C5,"MMM")

The logic is that the YEAR , MONTH and DAY functions will return the correct result only if C5 has a valid date in it ; if so , you can directly use the TEXT function on C5.

Narayan
 
Hi,

You can use this formula.

This will check if the cell has a date, and if it contains a date then would give you the first 3 letters of the month.
Code:
=IF(OR(CELL("format",C5)={"D1","D2","D3","D4","D5"}),TEXT(C5,"mmm"),"")
Regards!!
 
Back
Top