+ Reply to Thread
Results 1 to 5 of 5

If statement

Hybrid View

  1. #1
    ZIXILPLIX
    Guest

    If statement

    Assume cell A1 is a number to one decimal place but will never be negative. I need a code for cell B1 that will report the number in cell A1 with the text "FT" after it unless the number in A1 is 0 in which case B1 will report "N/A"

    So if A1 is "7.2" B1 will read "7.2FT" but if A1 is "0" B1 will read "N/A"

    Any help would be greatly appreciated.
    Last edited by ZIXILPLIX; 05-02-2010 at 03:25 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: If statement

    Try this:

    =IF(A1="", "N/A", A1 & "FT")
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    ZIXILPLIX
    Guest

    Re: If statement

    J,
    Thanks a lot for your help, but when the value of A1 is 0, B1 is reporting "0FT" and not "N/A." It's very close to a solution though because I did notice that if the A1 is empty then B1 reports "N/A." It's just not doing it for zeros.

    Any ideas?

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: If statement

    Simple tweak...

    =IF(A1=0, "N/A", A1 & "FT")

  5. #5
    ZIXILPLIX
    Guest

    Re: If statement

    Simple for you, still blows my mind. lol I actually did try putting a 0 in the first set of quotes so maybe I'm getting a little better at this. Thanks for your help!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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