+ Reply to Thread
Results 1 to 7 of 7

Question: Returning a specific text based on the date

  1. #1
    Registered User
    Join Date
    10-31-2016
    Location
    Washington, DC
    MS-Off Ver
    Professional Plus 2013
    Posts
    3

    Question: Returning a specific text based on the date

    Hello,

    Brand new user with what I'm hoping is a stupid question. I've been going to through the forum here and I can't seem to find anything that has a reference to what I'm looking for.

    I am trying to write a formula to return the word "Holiday" in cell A10 if cell A9 shows a date that matches a list of holidays referenced on another tab (='Reference Sheet'!F1:F20). The trick is that I want cell A10 to show the day of the week if A9 is not a holiday.

    The dates are referenced from the date listed on the reference sheet and continued with the formula =Workday(A9,1).
    The days of the week are referenced to the date above and displayed using =Text(A9,"dddd"). This is the cell that needs to change and I've tried every formula I can think of.

    Any thoughts?
    Attached Images Attached Images

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Question: Returning a specific text based on the date

    Welcome to the forum!

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    10-31-2016
    Location
    Washington, DC
    MS-Off Ver
    Professional Plus 2013
    Posts
    3

    Re: Question: Returning a specific text based on the date

    Thank you Ali,

    Please see attached
    Attached Files Attached Files

  4. #4
    Forum Expert dosydos's Avatar
    Join Date
    12-09-2015
    Location
    Massachusetts
    MS-Off Ver
    365(PC) V:2308
    Posts
    1,472

    Re: Question: Returning a specific text based on the date

    put this into L3

    =IF(IFERROR(MATCH(L2,Sheet2!$F$1:$F$20,0),0)>0,"Holiday",TEXT(L2,"dddd"))

  5. #5
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,899

    Re: Question: Returning a specific text based on the date

    Or try this formula in A3:

    =IF(COUNTIF(Sheet2!$F$1:$F$20,Sheet1!A2),"Holiday",TEXT(A2,"dddd"))

  6. #6
    Registered User
    Join Date
    10-31-2016
    Location
    Washington, DC
    MS-Off Ver
    Professional Plus 2013
    Posts
    3

    Re: Question: Returning a specific text based on the date

    Thanks Phuocam, that worked great!

  7. #7
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,899

    Re: Question: Returning a specific text based on the date

    You are welcome!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Two IF Functions based on Date and Specific Text
    By erjfly2013 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-23-2015, 12:23 PM
  2. Returning A Number Against Specific Text
    By Streaky in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-09-2014, 10:02 AM
  3. VBA - If a range of cells do not contain specific text based on date ranges, then error.
    By Carrie_Smattick in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-19-2013, 07:47 PM
  4. Inserting specific date-based text
    By TobiasFK in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-09-2010, 05:38 AM
  5. Replies: 6
    Last Post: 07-15-2009, 07:44 AM
  6. returning Specific Text
    By USChad in forum Excel General
    Replies: 1
    Last Post: 02-28-2008, 02:07 AM
  7. returning specific text only
    By Jane in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 03-21-2006, 04:45 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1