+ Reply to Thread
Results 1 to 2 of 2

Nesting IF and OR statements

  1. #1
    Registered User
    Join Date
    07-12-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    9

    Nesting IF and OR statements

    I'm trying to calculate a result based on if a period is weekly or monthly then look up the relevant value in an array based on the weekly or monthly equiv as follows

    =IF(R21="weekly",VLOOKUP(Q21,$AG$2:$AL$15,3)*OR(R21="monthly",VLOOKUP(Q21,$AG$2:$AL$15,4)))

    As the cell R21 happens to be monthly, the result from the array (AG2:AL15) should be 10 however the formula is looking for weekly first therefore returns FALSE rather than continuing through to the OR statement.
    Can anyone please advise the correct syntax for this? Note the lookup function is referring to different columns within the array dependent on whether cell R21 contains "weekly" or "monthly"
    Thanks

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Nesting IF and OR statements

    You don't need OR, if "weekly" or "monthly" are the only 2 options try this:

    =VLOOKUP(Q21,$AG$2:$AL$15,IF(R21="weekly",3,4))
    Audere est facere

+ 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] Nesting IF statements?
    By markthehousebuyer in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-14-2013, 01:59 PM
  2. nesting more than 7 if statements
    By KAPearson in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-28-2012, 06:24 AM
  3. Nesting IF statements
    By narrowgate88 in forum Excel General
    Replies: 3
    Last Post: 06-02-2009, 03:28 PM
  4. Nesting IF statements
    By penny in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-03-2007, 04:02 PM
  5. [SOLVED] nesting if statements
    By tjb in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-09-2005, 07:05 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