+ Reply to Thread
Results 1 to 5 of 5

Simplify the formula

  1. #1
    Registered User
    Join Date
    02-15-2010
    Location
    Bournemouth
    MS-Off Ver
    Excel 2003
    Posts
    76

    Simplify the formula

    Hello all

    I am new today to the forum and would like to say hello to all and thanks in advance for the help, assistance and advice to come.

    I have written the simple formula below using the 'IF' statment. The formula basically returns a value once a condition is met. My question is that whilst I am proud that I managed to write it without using any assistance, can the formual be simplified? (i.e. shortened to give the same results)?

    =IF(G2=G6-3,"Time to update or request details",IF(G2=G6-2,"Time to update or request details",IF(G2=G6-1,"Time to update or request details",IF(G2=G6,"Time to update or request details",IF(G2=G6+1,"ATTENTION!! Details overdue",IF(G2=G6+2,"ATTENTION!! Details overdue","ok"))))))

    Many thanks
    Ivor

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,755

    Re: Simplify the formula

    This reduces the IF nesting...

    =IF(OR(G2=G6-3,G2=G6-2,G2=G6-1,G2=G6),"Time to update or request details",IF(OR(G2=G6+1,G2=G6+2),"ATTENTION!! Details overdue","ok"))
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,695

    Re: Simplify the formula

    You could use LOOKUP, perhaps

    =LOOKUP(G2-G6,{-100000,-3,1,3;"ok","Time to update or request details","ATTENTION!! Details overdue","ok"})

  4. #4
    Registered User
    Join Date
    02-15-2010
    Location
    Bournemouth
    MS-Off Ver
    Excel 2003
    Posts
    76

    Smile Re: Simplify the formula

    Quote Originally Posted by 6StringJazzer View Post
    This reduces the IF nesting...

    =IF(OR(G2=G6-3,G2=G6-2,G2=G6-1,G2=G6),"Time to update or request details",IF(OR(G2=G6+1,G2=G6+2),"ATTENTION!! Details overdue","ok"))
    Thank you very much 6Sring Jazzer. That is something that will definitely be useful to me, as my new role here requires a lot of excel formula creation/manipulation.

    Cheers sir

  5. #5
    Registered User
    Join Date
    02-15-2010
    Location
    Bournemouth
    MS-Off Ver
    Excel 2003
    Posts
    76

    Re: Simplify the formula

    Hello Daddy Longlegs

    Thanks for your reply...WOW as you can tell by my question, my excel skills fall far short of those required to come up with your level of formula......please don't tell me you came up with that off of your head ha haha.

    That's great though sir, thanks a lot

    Cheers
    ^_^

+ 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