+ Reply to Thread
Results 1 to 8 of 8

IF function

  1. #1
    Forum Contributor
    Join Date
    07-26-2006
    Posts
    141

    IF function

    I am needing to know if there is a way to setup an if funciton to only look at part of a column. My list will as follows and I need my if function to look at only the last two digits and retun a value for me. I need the if funciton to look and see if the data ends in 00 or not.

    60-00
    60-01
    60-05
    60-06
    70-00
    70-01
    70-02 etc

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Try

    =IF(RIGHT(A1,2)="00",TRUE,FALSE)
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Contributor
    Join Date
    07-26-2006
    Posts
    141

    Function

    That works awesome. You guys are great.

  4. #4
    Forum Contributor
    Join Date
    07-26-2006
    Posts
    141

    Function

    Is there a way to have the funciton return part of the column it is checking. If the function you have me is false I would like for the false action to be to give me the first two digits of the data. If it was 60-00 I would like for the false to give me only to 60 or what ever the first two digits are.

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    For boolean result you don't really need an IF() statement...

    just simply:
    Please Login or Register  to view this content.
    will give same results.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  6. #6
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Maybe

    =IF(RIGHT(A1,2)="00",TRUE,LEFT(A1,2))
    VBA Noob

  7. #7
    Forum Contributor
    Join Date
    07-26-2006
    Posts
    141

    Function

    Once again that was exactly what I was needing. Thanks again.

  8. #8
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    No problem

    Glad it helped

    VBA Noob

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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