+ Reply to Thread
Results 1 to 7 of 7

IF AND statement or Vlookup or a Macro not sure which to use.

  1. #1
    Registered User
    Join Date
    06-21-2013
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    7

    IF AND statement or Vlookup or a Macro not sure which to use.

    Excel Test Help1.xlsxIf "item" in sheet2 matches "item' in sheet1 and "color' in sheet2 matches "color' on sheet one then return the number next to it. If it doesn't then move to the next one basically.
    Last edited by Papeters111; 06-13-2014 at 08:53 AM.

  2. #2
    Registered User
    Join Date
    03-13-2014
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: IF AND statement or Vlookup or a Macro not sure which to use.

    Try this formula (you may have to adjust the cell references a bit):

    =IF(AND(B6=Florals!B2,E6=Florals!C4),Florals!E3,"")

    It will return the total number in Sheet 1 if they match, and leave it blank if they don't.

  3. #3
    Registered User
    Join Date
    06-21-2013
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: IF AND statement or Vlookup or a Macro not sure which to use.

    It works, THANKS!
    but
    I need it to work on all of them. I think just needs a lot of nested. I'm gonna try to figure out the nested to get it from here if not ill post help.

  4. #4
    Registered User
    Join Date
    03-13-2014
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: IF AND statement or Vlookup or a Macro not sure which to use.

    What helps me to visualize nested functions is to think of it as a road with many forks. The IF function goes like this:

    IF *this* is true, then do *that* (go down the left fork), and if it is false, do *something else* (go down the right fork).

    Putting the following function in cell B1 : IF(A1=7,"HELLO!","GOODBYE!") If A1 = 7, then we go down the left fork which leads us to the text HELLO! or if A1 <> (doesn't equal) 7, then we go down the right fork to the text GOODBYE!

    IF(A1=7,"HELLO!",IF(AND(C2>5,A1<4),"SUPER!","GOODBYE!"))

    Here, if A1 = 7 we take the left fork to "HELLO!" and if A <> 7, we take the right fork, which now leads us to another set of forks. At this fork, if C2>5 and A1<4, we take the left fork to SUPER! and if not, we take the right fork to

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2010
    Posts
    6,238

    Re: IF AND statement or Vlookup or a Macro not sure which to use.

    PL see attached file with array formula.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    06-21-2013
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: IF AND statement or Vlookup or a Macro not sure which to use.

    Great explanation. I got the whole thing to work! Thank you so much!

    How to mark as solved. lol

  7. #7
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2010
    Posts
    6,238

    Re: IF AND statement or Vlookup or a Macro not sure which to use.

    Thanks for the compliment.
    I have changed formula slightly so that if column C is blank it will give blank result.slight improvement.
    To mark the thread solved at the top go to "Thread tools".
    Please Login or Register  to view this content.

+ 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. [SOLVED] Vlookup/if statement??? Need help before i can record a macro
    By pariyahdesign in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-05-2013, 04:19 PM
  2. Replies: 4
    Last Post: 06-01-2012, 10:05 AM
  3. Using a VLOOKUP and IF statement inside an IF statement
    By Isis3 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-08-2011, 07:04 PM
  4. Vlookup 'And' statement
    By moglione1 in forum Excel General
    Replies: 1
    Last Post: 03-09-2006, 12:10 PM
  5. Vlookup & If statement
    By rmeister in forum Excel General
    Replies: 2
    Last Post: 02-27-2006, 12:40 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