+ Reply to Thread
Results 1 to 5 of 5

IF statement not working with text function and edate function.

  1. #1
    Forum Contributor
    Join Date
    06-25-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    179

    IF statement not working with text function and edate function.

    Hello All,
    i have the following formula and it wont work when i add the edate function and text function.

    Basically i have a drop down in cell C3 (monthly and daily) and start date in c4 and an end date in C5.
    E3 = the start date using this formula =IF($C$3="daily",C4,TEXT(C4,"mmm-yy"))
    and e4 down should then be the next day or next month depending on C3.
    I've been trying to do this with the formula below but i just cant get it to work. Ideally i'd like it to display nothing when the end date it reached.

    This wont work
    =IF(AND($E3<=$C$5,$E$2="monthly"), TEXT(edate(E3,1), "mmm-yy"), IF(AND($E3<=$C$5,$E$2="daily"),E3+1,""))


    Any help would be great.

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: IF statement not working with text function and edate function.

    Your formula seems to be working. However, if your dates were entered as text then there could be a problem.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Forum Contributor
    Join Date
    06-25-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    179

    Re: IF statement not working with text function and edate function.

    AHh okay that might be it the dates come from the E col and ifs based on this formula: =IF($C$3="daily",C4,TEXT(C4,"mmm-yy")) how would i get around this?

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: IF statement not working with text function and edate function.

    You need to convert them to real dates. If this is in one cell, you can format cell as date then re-enter your date again.

    If your dates come from E column format E column as date, click on any empty cell and copy it, then paste special, values and select Add. This will convert them to dates.
    Last edited by AlKey; 11-04-2013 at 10:27 AM.

  5. #5
    Forum Contributor
    Join Date
    06-25-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    179

    Re: IF statement not working with text function and edate function.

    Thanks for the update will try and get back to you.

+ 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. [SOLVED] String Function not working when an IF statement is present
    By MWE2012 in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 05-02-2013, 08:56 PM
  2. Replies: 3
    Last Post: 04-16-2013, 01:03 AM
  3. Edate function Name error
    By SharonP. in forum Excel General
    Replies: 1
    Last Post: 05-02-2006, 02:25 PM
  4. [SOLVED] edate function
    By Candace in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-02-2005, 06:17 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