+ Reply to Thread
Results 1 to 4 of 4

Shorten a very long Formula

  1. #1
    Forum Contributor
    Join Date
    07-31-2012
    Location
    Cape Town South Africa
    MS-Off Ver
    Excel 2007
    Posts
    133

    Shorten a very long Formula

    Hi All

    I have this formula that works, but it's sooo looooong, there has to be a better way of doing it, can some-one with better knowledge shorten it. PFA. If a Macro is the better way to go then that will be fine.

    Thanks in advance
    Attached Files Attached Files
    Last edited by Floydlevedale; 04-15-2013 at 08:45 AM.

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Shorten a very long Formula

    perhaps

    =IFERROR(CHOOSE(MIN(LEN(SUBSTITUTE(K4,{"W","Y","P","O","B","G","R"},"")))+1,"ALL","TRI",IF(SUMPRODUCT(--(FREQUENCY(IFERROR(MATCH("*"&{"W","Y","P","O","B","G","R"}&"*",K4,0),""),IFERROR(MATCH("*"&{"W","Y","P","O","B","G","R"}&"*",K4,0),""))))=2,"2PR","1PR")),"NR")
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Shorten a very long Formula

    @ JP,

    on error goto bed
    Maybe I should just do that. Very impressive formula you provided here, to say the least!
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  4. #4
    Forum Contributor
    Join Date
    07-31-2012
    Location
    Cape Town South Africa
    MS-Off Ver
    Excel 2007
    Posts
    133

    Re: Shorten a very long Formula

    @ JP, Thank alot, I am speechless, wish I had your skills, anyway at least there's guys like you around.

+ 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