+ Reply to Thread
Results 1 to 4 of 4

Using OR for Nesting Multiple IF

  1. #1
    Registered User
    Join Date
    06-27-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    16

    Using OR for Nesting Multiple IF

    Hi guys, i have difficulties of getting the formula right for this following file here. what i am trying to do is to change the fields in Column A to another product.
    The formula that i am using is : =OR(IF(A2="a1",Iphone,""),IF(A2="a2","samsung",""),IF(A2="a3","HTC",""),IF(A2="a4","Nokia",""))
    I need a1 to change to Iphone, a2 to Samsung, a3 to HTC, and a4 to Nokia. attached file.
    Attached Files Attached Files

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Using OR for Nesting Multiple IF

    hi willbassyeah. try:
    =IF(A2="a1","iphone",IF(A2="a2","samsung",IF(A2="a3","HTC",IF(A2="a4","Nokia",""))))

    but i suggest you do up a table like this maybe in E1:F4
    a1 iphone
    a2 samsung
    a3 HTC
    a4 Nokia
    then do a VLOOKUP:
    =VLOOKUP(A2,$E$1:$F$4,2,0)

    i dont know how the OR comes into place. but OR is used something like this. say if A2 is "a1" or "a2", name it as "iphone". otherwise, blank. then:
    =IF(OR(A2="a1",A2="a2"),"iphone","")
    or:
    =IF(OR(A2={"a1","a2"}),"iphone","")

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Contributor
    Join Date
    05-07-2013
    Location
    apple valley ca
    MS-Off Ver
    Excel 2007
    Posts
    110

    Re: Using OR for Nesting Multiple IF

    =IFERROR(IF(A2="a1","Iphone",IF(A2="a2","samsung",IF(A2="a3","HTC",IF(A2="a4","Nokia","")))),"")

  4. #4
    Registered User
    Join Date
    06-27-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Using OR for Nesting Multiple IF

    Thanks for the reply guys, it works

+ 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