+ Reply to Thread
Results 1 to 9 of 9

multiple If statements in open office

Hybrid View

  1. #1
    Registered User
    Join Date
    01-23-2014
    Location
    United States
    MS-Off Ver
    excel 2000
    Posts
    33

    multiple If statements in open office

    Hello Again!
    Im looking to make a formula that states if b3 =10 then a. if b3=12 then b, if b3= 14, then c, if b3=16 then d. A, B, C, D are referring to links to another sheet.

    Hope you can help out.

    Tanner

  2. #2
    Registered User
    Join Date
    01-27-2014
    Location
    DFW, Texas
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: multiple If statements in open office

    if b3 =10 then a. if b3=12 then b, if b3= 14, then c, if b3=16 then d
    is written like
    =if(b3=10,a,if(b3=12,b,if(b3=14,c,if(b3=16,d,""))))

    the "" will give you a blank cell rather than #N/A if none of the criteria are met.

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,122

    Re: multiple If statements in open office

    try a lookup

    =LOOKUP(B3,{10,12,14,16},{"A","B","C","D"})

    should work in open office - I tried in libre Open Office

    unless you want to use the links in a formula and then indirect() would be needed to reference the cell and use the contents as a value for the link
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Registered User
    Join Date
    01-23-2014
    Location
    United States
    MS-Off Ver
    excel 2000
    Posts
    33

    Re: multiple If statements in open office

    For both equations above im getting errors. =IF(B3=10,a,IF(B3=12,b,IF(B3=14,c,IF(B3=16,d,"")))) I get err:508- error in bracketing. For the look-up =LOOKUP(B3,{10,12,14,16})- it won't keep the answers in the formula and it gives me err:512- formula overflow.

  5. #5
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,122

    Re: multiple If statements in open office

    what formula do you want the answers in?

    are you using ""

    =if(b3=10,"a",if(b3=12,"b",if(b3=14,"c",if(b3=16,"d",""))))
    OR
    =LOOKUP(B3,{10,12,14,16},{"A","B","C","D"})

  6. #6
    Registered User
    Join Date
    01-23-2014
    Location
    United States
    MS-Off Ver
    excel 2000
    Posts
    33

    Re: multiple If statements in open office

    Here is the exact formula i've tried. =IF(B3=10,"'Metal Price'.O2",IF(B3=12,"'Metal Price'.O3",IF(B3=14,"'Metal Price'.O4",IF(B3=16,"'Metal Price'.O5",""))))
    and =LOOKUP(B3,{10,12,14,16},{"'Metal Price'.O2","'Metal Price'.O3","'Metal Price'.O4","'Metal Price'.O5"})

    Both are giving me errors, am I doing something wrong?

  7. #7
    Registered User
    Join Date
    01-27-2014
    Location
    DFW, Texas
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: multiple If statements in open office

    =IF(B3=10,"'Metal Price'.O2",IF(B3=12,"'Metal Price'.O3",IF(B3=14,"'Metal Price'.O4",IF(B3=16,"'Metal Price'.O5",""))))

    That will only give you text that says "METAL PRICE'.02" etc. It works perfectly in MS Excel, Polaris open office, and Google spreadsheet. so the only other thing I can think if is that you may have the cell formatted as text or something that does not allow the formula to calculate properly. Try switching the format to "General" or the open office equivalent and then enter the cell to make it take effect. Sorry I'm not as familiar with open office as with Excel, but they are all similar enough it shouldn't matter.

  8. #8
    Registered User
    Join Date
    01-23-2014
    Location
    United States
    MS-Off Ver
    excel 2000
    Posts
    33

    Re: multiple If statements in open office

    Here is what I got to work. =IF(B3=10;'Metal Price'.$P$233; IF(B3=12;'Metal Price'.$P$242; IF(B3=14;'Metal Price'.$P$248; IF(B3=16;'Metal Price'.$P$249))))

    Thanks for the help!

  9. #9
    Registered User
    Join Date
    01-27-2014
    Location
    DFW, Texas
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: multiple If statements in open office

    Glad you got it working.
    It looks like the syntax is slightly different between Excel and open office.
    I'll keep that in mind for future questions. ";" instead of "," to seperate syntax sections in the formula and "." instead of "&" to concatenate text with cell values.

    Thanks for posting the solution so I could see where it differed.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 12-10-2013, 01:27 PM
  2. MS office vs open office compatible
    By Mladjone in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-14-2011, 08:23 AM
  3. Replies: 12
    Last Post: 05-15-2009, 08:38 AM
  4. Open Office
    By rickalty in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-25-2006, 04:20 AM
  5. Problem of Open Office and MS Office
    By PKH in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-04-2005, 12:06 AM

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