+ Reply to Thread
Results 1 to 20 of 20

IF statement for vested years greater than 10

  1. #1
    Registered User
    Join Date
    04-20-2017
    Location
    Maryland, USA
    MS-Off Ver
    MS 2010
    Posts
    16

    IF statement for vested years greater than 10

    I was wondering if any one could help me out. I am trying to write an IF statement for vested years that are greater than 10. I have tried multiple styles but did not have any luck. I need to apply the statement to the entire column as well. this is what I had but all I keep getting is yes in every cell when it should be blank =IF(F11>10,"YES",IF(F11<10,""))

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: IF statement for vested years greater than 10

    Please explain what is not happening that you expect as the formula appears ok.

    Give some examples?
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    04-20-2017
    Location
    Maryland, USA
    MS-Off Ver
    MS 2010
    Posts
    16

    Re: IF statement for vested years greater than 10

    I am trying to get the statement to return a yes for anyone with 10 or more years. When I apply the formula to the column everything becomes a yes when in actualality some should still be blank.

  4. #4
    Registered User
    Join Date
    04-20-2017
    Location
    Maryland, USA
    MS-Off Ver
    MS 2010
    Posts
    16

    Re: IF statement for vested years greater than 10

    In the f column I have years of service the first five are (15,15,2,2,6). Now I have the I column for the vested years where I am trying to apply the formula. All I need is a yes for anyone with 10 or more years.

  5. #5
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: IF statement for vested years greater than 10

    With your first five figures, your formula returns Yes, Yes, "", "", ""

    What do you expect?

  6. #6
    Registered User
    Join Date
    04-20-2017
    Location
    Maryland, USA
    MS-Off Ver
    MS 2010
    Posts
    16

    Re: IF statement for vested years greater than 10

    On my excel spread sheet I am not getting those answers though i am getting yes in all of them

  7. #7
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: IF statement for vested years greater than 10

    How about attach the sheet so we can see it?

    or try

    =LOOKUP(F2,{0,10},{"","Yes"})

  8. #8
    Registered User
    Join Date
    04-20-2017
    Location
    Maryland, USA
    MS-Off Ver
    MS 2010
    Posts
    16

    Re: IF statement for vested years greater than 10

    I need an if statement the look up did not work
    Attached Files Attached Files

  9. #9
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: IF statement for vested years greater than 10

    In J13 and copied down...

    =IF(G13<>"",IF(LEFT(G13,FIND(" ",G13)-1)+0>$H$11,"YES","N0"),"")

  10. #10
    Registered User
    Join Date
    04-20-2017
    Location
    Maryland, USA
    MS-Off Ver
    MS 2010
    Posts
    16

    Re: IF statement for vested years greater than 10

    It now gives me only no answers

  11. #11
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: IF statement for vested years greater than 10

    How's this
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    04-20-2017
    Location
    Maryland, USA
    MS-Off Ver
    MS 2010
    Posts
    16

    Re: IF statement for vested years greater than 10

    same thing it is locked on the no answer

  13. #13
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: IF statement for vested years greater than 10

    On second thought, I would even go one step further by applying a custom format to the years column so it takes only numbers, but you can also see the title of years.

    Now in the formula we can remove the Left function and just evaluate the numbers of years against the vested years variable.
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    04-20-2017
    Location
    Maryland, USA
    MS-Off Ver
    MS 2010
    Posts
    16

    Re: IF statement for vested years greater than 10

    now its locked on yes, Idk if this helps but my formula to calculate the years of service in the original document column is =DATEDIF(B12:B754,Start_Date,"y")&" years". From there I need the IF statement to just say vested yes or " '', but im not getting it, it keeps getting locked on one answer

  15. #15
    Registered User
    Join Date
    04-20-2017
    Location
    Maryland, USA
    MS-Off Ver
    MS 2010
    Posts
    16

    Re: IF statement for vested years greater than 10

    the question was still not answered anyone with help please help. on my other formulas I had to define names on the equations and all.

  16. #16
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: IF statement for vested years greater than 10

    Quote Originally Posted by link062 View Post
    now its locked on yes, Idk if this helps but my formula to calculate the years of service in the original document column is =DATEDIF(B12:B754,Start_Date,"y")&" years".
    I would like to help further, but you need to help also. When you post a sample, post what you actually have so we can tailor an answer to meet your needs.
    Last edited by jeffreybrown; 04-20-2017 at 07:41 PM.

  17. #17
    Registered User
    Join Date
    04-20-2017
    Location
    Maryland, USA
    MS-Off Ver
    MS 2010
    Posts
    16

    Re: IF statement for vested years greater than 10

    need help writing formula for vested years using an if statement. I have used multiple formulas but the answer gets locked on whatever it is labled as to the entire column. I have used =if(f11>=10,"yes'','' '') as well as other variations. I have posted a test document with this post. I can get the formula to work if the information is copied to a new document but I need it to work in the original.
    Attached Files Attached Files

  18. #18
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: IF statement for vested years greater than 10

    In I11 try...

    =IF(F11<>"",IF(TRIM(LEFT(F11,2))+0>$G$9,"YES","N0"),"")

  19. #19
    Registered User
    Join Date
    04-20-2017
    Location
    Maryland, USA
    MS-Off Ver
    MS 2010
    Posts
    16

    Re: IF statement for vested years greater than 10

    Yes finally thank you so much. do you know why the other ways it was written would not work, why did it have to be written like this?

  20. #20
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: IF statement for vested years greater than 10

    Well with the other ways you were writing it the formula could not handle the number of years and the text "years" in the same cell.

    That is why the left function was used to extract just the numbers so you could compare it to the vested number of years.

    Another method:

    In F11 >> =DATEDIF(B11,Start_Date,"y")+0

    In I11 >> =IF(F11<>"",IF(F11>$G$9,"YES","N0"),"")

    Custom Format Column F
    • Right click cell (or Ctrl + 1)
    • Format Cells
    • Number
    • Custom
    • Type: 0" years""

    Now column F appears as 15 years, but in reality, the cell contents contents only 15.

+ 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] Calculate years between dates greater than 100
    By Ltat42a in forum Excel General
    Replies: 4
    Last Post: 03-03-2015, 08:38 PM
  2. if statement for 3 years
    By ammartino44 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-22-2014, 01:43 AM
  3. [SOLVED] Age based on DOB; Accounts for leap years. Years old if >2, Months if <2 years old.
    By sharpmel in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-17-2013, 04:20 PM
  4. Average if statement for specific years without separate equations
    By C2k in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-31-2012, 09:24 PM
  5. Harry Vested Gravity Collection...newbie here
    By kusame in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 07-17-2012, 10:06 PM
  6. Harry Vested of Gravity Collection newbie....
    By jolem in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 07-10-2012, 09:23 AM
  7. [SOLVED] need an income statement forecasting worksheet for future years
    By top gun in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-28-2005, 09:30 AM

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