• 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.

TEXT function unable to displaying two names

Hello guys, I am attempting to display via a TEXT function in cell B5 the day name according to the date contained within A5, now this works fine. Taking this a step further I would like to display two day names when the condtion in C5 = "cool". I am unsure how to tackle this issue. Could I ask for some advise please.

When C5="cool" B5 should display "Sun/Mon" at present I am getting an Error.
I have attached a sample sheet for viewing. Any assistance would be appreciated. I had posted this question on a different site but did not recieve any active reply.

Thanks everyone.
 

Attachments

  • text Function.xlsx
    9.1 KB · Views: 15
John your understanding of my issue was spot-on. I made a slight change by replacing the "V" with a hyphen. The fuctionality and presentataion are absolutly perfect.
Thank you so much for your help and assistance, it is very much appreciated.
 
If I understand correctly, you can use in B3 this formula:

=IF(A3="","",TEXT(A3,"ddd")&IF(C3="cool",TEXT(A3+1,"\/ddd"),""))

Blessings!

I would have come up with this solution,

=IF(A3="","",TEXT(A3,"ddd"))&IF(AND(A3<>"",C3="cool"),CONCATENATE("/",TEXT(A3+1,"ddd")),"")

But thanks to @John Jairo V I have learned something new today, I wasn't able to figure out this part of his formula "\/ddd" but then I google it and got to know about escape sequence. The backslash acts as an escape sequence in his formula.
 
Back
Top