+ Reply to Thread
Results 1 to 5 of 5

IF versus LOOKUP versus ARRAY?

  1. #1
    Forum Contributor Gtrtim112's Avatar
    Join Date
    04-12-2013
    Location
    Alabama, USA
    MS-Off Ver
    Excel 2016
    Posts
    332

    IF versus LOOKUP versus ARRAY?

    I'm trying to see which formula would work best for me without being 18 miles long. I don't think an attachment is necessary.

    A1 contains a drop down list of 5 colors

    If RED is chosen, A2 will populate a particular answer. For this example, let's say TOY. A3 will populate CAR. A4 will populate LAMP
    IF BLUE is chosen, A2 will populate FISH, A3 will populate BIKE, A4 will populate JAR

    I think you get the idea... Depending on what is in A1, the other cells equal something else. I currently have this as an IF formula but it took forever typing it all out and not being able to copy and paste the formula over and over. I'm thinking there's a better way using a LOOKUP or ARRAY formula.

    Any ideas? I can post the actual spreadsheet if needed.

    Thanks!!

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: IF versus LOOKUP versus ARRAY?

    Hi,

    One way would be to create a table with the colours along the same row and the objects underneath each colour in order. e.g.
    Red Blue
    Toy Fish
    Car Bike
    Lamp Jar
    ..etc

    Name this list say 'Lists'

    Now in A2 copied down enter

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    change the '4' in the formula to reflect the number of colour lists you have
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor Gtrtim112's Avatar
    Join Date
    04-12-2013
    Location
    Alabama, USA
    MS-Off Ver
    Excel 2016
    Posts
    332
    Thanks, Richard! I'll give it a whirl and let you know how it comes out.

    Quote Originally Posted by Richard Buttrey View Post
    Hi,

    One way would be to create a table with the colours along the same row and the objects underneath each colour in order. e.g.
    Red Blue
    Toy Fish
    Car Bike
    Lamp Jar
    ..etc

    Name this list say 'Lists'

    Now in A2 copied down enter

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    change the '4' in the formula to reflect the number of colour lists you have

  4. #4
    Forum Contributor Gtrtim112's Avatar
    Join Date
    04-12-2013
    Location
    Alabama, USA
    MS-Off Ver
    Excel 2016
    Posts
    332
    Quote Originally Posted by Gtrtim112 View Post
    Thanks, Richard! I'll give it a whirl and let you know how it comes out.
    I do have another scenario within this same spreadsheet that may fall under this same line of thinking but may need to be figured a little differently.

    Once A2, A3 & A4 have been determined (I'm pretty certain that your trick above will work), I then need to have D2 (and D3, D4, etc) = a number. This number will either be equal to B2 or it will be B2 divided by C2. The word that populates in A2 will determine this.

    -----A-----B-----C------D
    1. RED ---5-----1------5
    2. TOY ---16-----8-----2

    The tricky part for me on this is that sometimes it will need to equal another cell and sometimes it needs to divide the two numbers. It all depends on what is in A of the same row.

    If you have any ideas there, let me know. I'll work the list part out first and then attach an example if you think it would help.

    Thank you!
    Last edited by Gtrtim112; 10-21-2015 at 10:58 PM.

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,459

    Re: IF versus LOOKUP versus ARRAY?

    It is hard to go without a sample Worksheet, but try:
    D2=IF(OR(A1={"RED","BLUE","YELLOW"}),B1,B1/2)
    Drag down.
    If it does not work, upload a sample WS.
    Quang PT

+ 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. Excel versus ERP
    By pansovic in forum Excel General
    Replies: 3
    Last Post: 07-17-2014, 01:51 AM
  2. [SOLVED] A simple (I hope!) ARRAY question regarding blanks versus zeroes
    By DaddyMac in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-15-2013, 11:45 AM
  3. [SOLVED] 3,000 Tables versus 3,000 Worksheets versus 3,000 Workbooks
    By StevenM in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-18-2012, 03:15 AM
  4. Array versus. SUMIFS
    By billybobb in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-27-2011, 03:56 PM
  5. SUMPRODUCT * versus ,
    By ChemistB in forum Excel General
    Replies: 3
    Last Post: 02-25-2008, 03:38 PM
  6. [SOLVED] R1C1 versus A1
    By Stuart Grant in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 10-07-2005, 01:05 PM
  7. XLA versus Reference versus Nothing
    By Jos Vens in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-11-2005, 04: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