Results 1 to 2 of 2

Thread: Help Rearranging If Statement
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    Jul 2011
    Posts
    437
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Help Rearranging If Statement

    Hi,

    I'm trying to rearrange my if statement and I'm getting lost in it...

    Here's the code broken apart:

    Code:
    =IF(OR(F6="Y",AN6<=6),AQ6,
    
    
    IF(AND(O6="N",SEARCH("Comp",D6),LEFT(D6,2)+0>24,AQ6>=7.5),AQ6,
    
    
    IF(AND(O6="N",SEARCH("Comp",D6),LEFT(D6,2)+0>24),
    
    
    IF(OR(AND(VLOOKUP(A6,'WOs (DSP Only)'!A:B,2,FALSE)>=7.5,(365/((AN6*AQ6)/VLOOKUP(A6,'WOs (DSP Only)'!A:B,2,FALSE)))>Details!AR6),AND(VLOOKUP(A6,'WOs (DSP Only)'!A:C,3,FALSE)>=7.5,(365/((AN6*AQ6)/VLOOKUP(A6,'WOs (DSP Only)'!A:C,3,FALSE)))>Details!AR6),AND(VLOOKUP(A6,'WOs (DSP Only)'!A:D,4,FALSE)>=7.5,(365/((AN6*AQ6)/VLOOKUP(A6,'WOs (DSP Only)'!A:D,4,FALSE)))>Details!AR6),AND(VLOOKUP(A6,'WOs (DSP Only)'!A:E,5,FALSE)>=7.5,(365/((AN6*AQ6)/VLOOKUP(A6,'WOs (DSP Only)'!A:E,5,FALSE)))>Details!AR6),AND(VLOOKUP(A6,'WOs (DSP Only)'!A:F,6,FALSE)>=7.5,(365/((AN6*AQ6)/VLOOKUP(A6,'WOs (DSP Only)'!A:F,6,FALSE)))>Details!AR6)),7.5,
    
    
    IF(AND(O6="N",SEARCH("Comp",D6),LEFT(D6,2)+0>24,VLOOKUP(A6,'WOs (DSP Only)'!A:B,2,FALSE)<5,VLOOKUP(A6,'WOs (DSP Only)'!A:C,3,FALSE)<5,VLOOKUP(A6,'WOs (DSP Only)'!A:D,4,FALSE)<5,VLOOKUP(A6,'WOs (DSP Only)'!A:E,5,FALSE)<5,VLOOKUP(A6,'WOs (DSP Only)'!A:F,6,FALSE)<5,(365/((AN6*AQ6)/VLOOKUP(CONCAT(D6,"-",O6),Calibration!P:S,4,FALSE)))>AR6),5,IF(AND(VLOOKUP(A6,'WOs (DSP Only)'!A:B,2,FALSE)>=5,VLOOKUP(A6,'WOs (DSP Only)'!A:B,2,FALSE)<7.5,ROUNDDOWN(365/((AN6*AQ6)/VLOOKUP(A6,'WOs (DSP Only)'!A:B,2,FALSE)),0)>ROUNDDOWN(AR6,0)),VLOOKUP(A6,'WOs (DSP Only)'!A:B,2,FALSE),IF(AND(VLOOKUP(A6,'WOs (DSP Only)'!A:C,3,FALSE)>=5,VLOOKUP(A6,'WOs (DSP Only)'!A:C,3,FALSE)<7.5,ROUNDDOWN(365/((AN6*AQ6)/VLOOKUP(A6,'WOs (DSP Only)'!A:C,3,FALSE)),0)>ROUNDDOWN(AR6,0)),VLOOKUP(A6,'WOs (DSP Only)'!A:C,3,FALSE),IF(AND(VLOOKUP(A6,'WOs (DSP Only)'!A:D,4,FALSE)>=5,VLOOKUP(A6,'WOs (DSP Only)'!A:D,4,FALSE)<7.5,ROUNDDOWN(365/((AN6*AQ6)/VLOOKUP(A6,'WOs (DSP Only)'!A:D,4,FALSE)),0)>ROUNDDOWN(AR6,0)),VLOOKUP(A6,'WOs (DSP Only)'!A:D,4,FALSE),IF(AND(VLOOKUP(A6,'WOs (DSP Only)'!A:E,5,FALSE)>=5,VLOOKUP(A6,'WOs (DSP Only)'!A:E,5,FALSE)<7.5,ROUNDDOWN(365/((AN6*AQ6)/VLOOKUP(A6,'WOs (DSP Only)'!A:E,5,FALSE)),0)>ROUNDDOWN(AR6,0)),VLOOKUP(A6,'WOs (DSP Only)'!A:E,5,FALSE),IF(AND(VLOOKUP(A6,'WOs (DSP Only)'!A:F,6,FALSE)>=5,VLOOKUP(A6,'WOs (DSP Only)'!A:F,6,FALSE)<7.5,ROUNDDOWN(365/((AN6*AQ6)/VLOOKUP(A6,'WOs (DSP Only)'!A:F,6,FALSE)),0)>ROUNDDOWN(AR6,0)),VLOOKUP(A6,'WOs (DSP Only)'!A:F,6,FALSE)))))))))))
    I'm trying to push this part to the end, so it get's evaluated last. Can someone help me rearrange and reconstruct please? I feel like I'm going nuts looking at it...

    Code:
    IF(OR(AND(VLOOKUP(A6,'WOs (DSP Only)'!A:B,2,FALSE)>=7.5,(365/((AN6*AQ6)/VLOOKUP(A6,'WOs (DSP Only)'!A:B,2,FALSE)))>Details!AR6),AND(VLOOKUP(A6,'WOs (DSP Only)'!A:C,3,FALSE)>=7.5,(365/((AN6*AQ6)/VLOOKUP(A6,'WOs (DSP Only)'!A:C,3,FALSE)))>Details!AR6),AND(VLOOKUP(A6,'WOs (DSP Only)'!A:D,4,FALSE)>=7.5,(365/((AN6*AQ6)/VLOOKUP(A6,'WOs (DSP Only)'!A:D,4,FALSE)))>Details!AR6),AND(VLOOKUP(A6,'WOs (DSP Only)'!A:E,5,FALSE)>=7.5,(365/((AN6*AQ6)/VLOOKUP(A6,'WOs (DSP Only)'!A:E,5,FALSE)))>Details!AR6),AND(VLOOKUP(A6,'WOs (DSP Only)'!A:F,6,FALSE)>=7.5,(365/((AN6*AQ6)/VLOOKUP(A6,'WOs (DSP Only)'!A:F,6,FALSE)))>Details!AR6)),7.5,
    Thank you all!
    Last edited by nirvehex; Apr 2nd, 2019 at 12:20 PM.

  2. #2
    Board Regular
    Join Date
    Jul 2011
    Posts
    437
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Help Rearranging If Statement

    Nevermind, I sorted this out.

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •