+ Reply to Thread
Results 1 to 4 of 4

Using if with a list

  1. #1
    Registered User
    Join Date
    10-02-2012
    Location
    Rio de Janeiro, Brasil
    MS-Off Ver
    Excel 2010
    Posts
    12

    Using if with a list

    I am looking for places to live and giving them values based on some conditions (helps me think) and everything is working fine but here is where I needed to simplify, I want the formula to add 200000 whenever a tube stop is displayed.

    I have a column where I have the tube stops of each place, on column "M"

    This my formula at the moment:

    =IF(OR(M6="Canary Wharf";M6="South Quay";M6="Haron Quays";M6="Poplar";M6="All saints";M6="Crossharbour";M6="Mudchutte";M6="Island Gardens");200000;0)

    The thing is I wanted to simplify this formula in a way that I create a list, on another sheet with the tube stops i want it to sum 200000 because I am afraid I get to a point I have to many stops and the formula is to big. Is there a way to create a formula that it would go and look if the value is on my list and put 200000?

  2. #2
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Using if with a list

    Hi Believe82

    What if you put your tube stops in a cells S1:S8
    Canary Wharf
    South Quay
    Haron Quays
    Poplar
    All saints
    Crossharbour
    Mudchutte
    Island Gardens

    Then: =IFERROR(IF(MATCH(M6,S1:S8,0)>0,200000),0)
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

  3. #3
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Using if with a list

    One way of doing this is to create a list of all the tube stations (which I did in T1:T8) and use this formula:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If there is a tube station in M6 that is in the tube station list, 20,000 will be returned. If not, a 0 will be returned.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  4. #4
    Registered User
    Join Date
    10-02-2012
    Location
    Rio de Janeiro, Brasil
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Using if with a list

    Thank you both for the quick reply! Worked like a charm!

+ 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