+ Reply to Thread
Results 1 to 5 of 5

If(text(U:U,"mm">6,....

  1. #1
    Registered User
    Join Date
    01-14-2015
    Location
    Glyndon, Minnsota
    MS-Off Ver
    Microsoft Office 365
    Posts
    11

    If(text(U:U,"mm">6,....

    Good Morning,

    I am trying to create a formula where I can get the fiscal year based of the effective date in column U in my spreadsheet. This is the formula I have in my spreadsheet.

    =IF(TEXT(U:U,"mm")>6,TEXT(U:U,"yyy")+1,TEXT(U:U,"yy"))

    The problem is it has everything as "true" so it is putting everything in the following fiscal year. For instance if the date is 1/5/2009 that would be fiscal year 2009 but the formula above gives me 2010. However, if the date is 7/8/2009 it gives me 2010 which is be correct. The cut off is June 30th of each year so I thought if I just used the month of June so "mm" greater than 6 I would be okay.

    How do I correct this formula to make it so that it gives me the "false" part of the equation?

    Thanks you,
    Carmen

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,737

    Re: If(text(U:U,"mm">6,....

    TEXT returns a text result (naturally), so you can't compare the value "06" , or whatever the month is, directly with 6 - why not just use MONTH to get the month from the date (as a number)?

    Hope this helps.

    Pete

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: If(text(U:U,"mm">6,....

    The TEXT function returns...well...TEXT
    Even if the value looks like a number, Excel considers it a Text String
    Try IF(TEXT(cell,"mm")+0>6,...

    or even just use the MONTH function
    IF(MONTH(cell)>6,..

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: If(text(U:U,"mm">6,....

    Try this:
    =TEXT(U2,"yy")+(month(U2)>6))
    or if you want the full year:
    =YEAR(U2)+(month(U2)>6))
    and copy down.
    Remember what the dormouse said
    Feed your head

  5. #5
    Registered User
    Join Date
    01-14-2015
    Location
    Glyndon, Minnsota
    MS-Off Ver
    Microsoft Office 365
    Posts
    11

    Re: If(text(U:U,"mm">6,....

    Thank you for the help everyone. I was haven't used the month and year functions before. It worked much better for what I was trying to do. I'll keep them in my memory bank.

    Have a great day,
    Carmen

+ 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. Replies: 1
    Last Post: 08-15-2014, 06:00 AM
  2. Date format of just "st" "nd" "rd" and "th" with text included
    By notrandom in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-10-2013, 05:45 PM
  3. [SOLVED] If there is any text in column "A$" on "sheet1" then move cell to column "A$" on "sheet2"
    By ckgeary in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-27-2013, 08:28 PM
  4. How can i copy value from "HTMLText"(EMBED("Forms.HTML:Text","")),using Macro
    By andrewyang in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-18-2010, 12:47 AM
  5. Replies: 3
    Last Post: 10-25-2005, 07:05 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