+ Reply to Thread
Results 1 to 4 of 4

Setting conditions.

  1. #1
    Registered User
    Join Date
    11-12-2014
    Location
    Philippines
    MS-Off Ver
    2007
    Posts
    2

    Setting conditions.

    Good day people! I'm kind of in need of help with my 2007 Excel. How do I create a formula for something like this:

    If I type 20', 40', reefer, or 20x20' on a cell, how do I set a fixed numeric value for each to the other cell? Like 250 for 20', 450 for 40' and reefer, and 500 for 20x20'?

    Sites suggest to use conditional formatting, but I don't know what to do or formula to use.

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.85 (24051214))
    Posts
    8,830

    Re: Setting conditions.

    in the other cell - type an IF() formula
    you could also use a look up table

    assuming you type in cell A2

    in the "other Cell" you want the result put

    =IF( A2= "20'" , 250 , IF( AND( A2="40'", A2="reefer") , 450, IF( A2="20x20'" , 500, "criteria not in cell A2" )))

    if that does not work - then

    Please upload a sample of your workbook to the forum, Make sure you have removed any private information, remember this is a public forum and so available to anyone
    Would like to see an example of your data and also a manual mock up of the expected results you want to achieve.

    To attach a file to your post,
    click "Go advanced" (next to quick post),
    scroll down until you see "manage Attachments",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    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.

  3. #3
    Registered User
    Join Date
    11-12-2014
    Location
    Philippines
    MS-Off Ver
    2007
    Posts
    2

    Re: Setting conditions.

    Quote Originally Posted by etaf View Post
    in the other cell - type an IF() formula
    you could also use a look up table

    assuming you type in cell A2

    in the "other Cell" you want the result put

    =IF( A2= "20'" , 250 , IF( AND( A2="40'", A2="reefer") , 450, IF( A2="20x20'" , 500, "criteria not in cell A2" )))
    Thank you very much! I removed the "AND" part because it kept on giving me a "FALSE" value. I replaced it with another "IF", and it worked. I'm kind of confused about the "criteria not in cell A2" though. If I delete it from the formula, it'll give me a "FALSE" value if for example "A2" is empty. I just replaced it with "(empty space)" so that the other cell will look empty.

    =IF(F3="20'",250,IF(F3="40'",450,IF(F3="20x20'",500,IF(F3="reefer",450," "))))

    Again, thank you for helping a beginner.

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.85 (24051214))
    Posts
    8,830

    Re: Setting conditions.

    Sorry - that should have been an OR
    not an AND - my mistake

    that " "
    is actually putting a space into the cell
    use
    ""
    which will leave the cell blank

    so with an OR
    its
    =IF( A2= "20'" , 250 , IF( OR ( A2="40'", A2="reefer") , 450, IF( A2="20x20'" , 500, "" )))

    But another IF is fine
    I'm kind of confused about the "criteria not in cell A2" though. If I delete it from the formula, it'll give me a "FALSE" value if for example "A2" is empty.
    Yes if none of those criteria exist - then you need to tell excel what to do if false
    hence if you leave the part missing you get a FALSE
    otherwise a " " or as i suggested "" will leave the cell blank
    Last edited by etaf; 11-12-2014 at 09:51 AM.

+ 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. Setting conditions in Text
    By LAO628 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-17-2012, 01:40 PM
  2. Setting macro Conditions (auto email)
    By AsifShabbir in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-18-2011, 06:02 AM
  3. Excel 2008 : Setting up logical compare conditions
    By spark6969 in forum Excel General
    Replies: 4
    Last Post: 07-28-2010, 01:09 AM
  4. Setting Conditions
    By Tashia in forum Excel General
    Replies: 2
    Last Post: 03-13-2009, 12:47 PM
  5. limit of setting conditions
    By lalaexcel in forum Excel General
    Replies: 2
    Last Post: 05-09-2006, 09:10 PM

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