+ Reply to Thread
Results 1 to 4 of 4

Only display all numbers before the “.”

  1. #1
    Forum Contributor
    Join Date
    11-20-2011
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007, Excel 2003, Excel 2010
    Posts
    284

    Only display all numbers before the “.”

    I am trying to create an if statement that will only display all the values before the “.”. If there is no “.”, then simply display the number. Basically I am trying to exclude every value after the “.”, if there is one. Is there a formula that could accomplish this or would I have to create a macro to accomplish this.
    101.12
    10001.1
    1000
    99.1
    94.123

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Only display all numbers before the “.”

    rlsublime,

    Give this a try:
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Contributor
    Join Date
    08-29-2011
    Location
    Atlanta
    MS-Off Ver
    Excel 2007
    Posts
    171

    Re: Only display all numbers before the “.”

    Or try:
    =IF(ISERROR(FIND(".",A1,1)),A1,LEFT(A1,FIND(".",A1,1)-1)*1)

    Where A1 is the value you are evaluating

  4. #4
    Forum Contributor
    Join Date
    08-29-2011
    Location
    Atlanta
    MS-Off Ver
    Excel 2007
    Posts
    171

    Re: Only display all numbers before the “.”

    Just tested tigeravatar's solution - it's a lot simplier than mine.

+ 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