+ Reply to Thread
Results 1 to 2 of 2

If Statement Limits

  1. #1
    Registered User
    Join Date
    12-01-2004
    Posts
    1

    If Statement Limits



    Is there a way around the 7 IF statements in a formula? I have a formula that works but crashes if I go past this limit. I need a formual that would do up to 15 IF statements. Here is an example:

    =IF(RC15=36,INDEX('Bath Tissue'!R3C1:R12C15,MATCH('DVoid Import Sheet'!RC9,'Bath Tissue'!R3C1:R12C1,0),4),IF(RC15=32,INDEX('Bath Tissue'!R3C1:R12C18,MATCH('DVoid Import Sheet'!RC9,'Bath Tissue'!R3C1:R12C1,0),5),IF(RC15=28,INDEX('Bath Tissue'!R3C1:R12C18,MATCH('DVoid Import Sheet'!RC9,'Bath Tissue'!R3C1:R12C1,0),6),IF(RC15=24,INDEX('Bath Tissue'!R3C1:R12C18,MATCH('DVoid Import Sheet'!RC9,'Bath Tissue'!R3C1:R12C1,0),7),IF(RC15=20,INDEX('Bath Tissue'!R3C1:R12C18,MATCH('DVoid Import Sheet'!RC9,'Bath Tissue'!R3C1:R12C1,0),8),"")))))

    Is there a way around this?

  2. #2
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Try the following...

    =INDEX('Bath Tissue'!R3C1:R12C18,MATCH('DVoid Import Sheet'!RC9,'Bath Tissue'!R3C1:R12C1,0),CHOOSE(MATCH(RC15,{36,32,28,24,20},0),4,5,6,7,8))

    OR

    =INDEX('Bath Tissue'!R3C1:R12C18,MATCH('DVoid Import Sheet'!RC9,'Bath Tissue'!R3C1:R12C1,0),VLOOKUP(RC15,Sheet3!R1C1:R5C2,2,0))

    ...where Sheet3!R1C1:R5C2 contains the following table:

    Please Login or Register  to view this content.
    I'm assuming that the reference for the first INDEX function should be R12C18 not R12C15.

    Hope this helps!

+ 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