+ Reply to Thread
Results 1 to 6 of 6

What part of this IF statement is working

  1. #1
    Forum Contributor
    Join Date
    06-25-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    179

    What part of this IF statement is working

    I just want it so that if a I = 2 the value in E20 doesnt appear.

    =IF(AND(B20="",C20=""),"",IF( I19 = 2,A20&B20&D20&C20&" "&F20,A20&B20&D20&C20&" "&F20E20))

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: What part of this IF statement is working

    You missing &:
    =IF(AND(B20="",C20=""),"",IF( I19 = 2,A20&B20&D20&C20&" "&F20,A20&B20&D20&C20&" "&F20&E20))

    But you can also:

    =IF(AND(B20="",C20=""),"",A20&B20&D20&C20&" "&F20&IF( I19 = 2,"",E20))

  3. #3
    Forum Contributor
    Join Date
    06-25-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    179

    Re: What part of this IF statement is working

    I cant get those to work either way i end up with the data from E20.

  4. #4
    Forum Contributor
    Join Date
    06-25-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    179

    Re: What part of this IF statement is working

    Look at the example in this sheetTest book1.xls

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: What part of this IF statement is working

    You have numbers stored as a text. So it won't work this way.
    You can either add "2" instead of 2 and it will work.

    =IF(AND(B20="",C20=""),"",A20&B20&D20&C20&" "&F20&IF( I19 = "2","",E20))

    however, I would rather use numbers like: Instead of joining 2 and .1 into text 2.1 use 2 + 1/10 that will give you number 2.1

  6. #6
    Forum Contributor
    Join Date
    06-25-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    179

    Re: What part of this IF statement is working

    Thank you.
    I will make the ammendments to the sheet now

+ 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