+ Reply to Thread
Results 1 to 6 of 6

How to use AND & IF and shorten a long formula

  1. #1
    Forum Contributor
    Join Date
    04-22-2017
    Location
    AU
    MS-Off Ver
    Microsoft 365
    Posts
    291

    How to use AND & IF and shorten a long formula

    Hello all,

    Looking for a shorter formula using AND and IF functions
    The attached WorkBook shows the issue and example of the very long formula I am currently using.
    The Sheet is to be used to record skills results for fighting fires (Drills).
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: How to use AND & IF and shorten a long formula

    Why specifically If and AND? Do you know that this is the best way forward? I will have a look, but you really should explain fully within your post, giving the formula you are asking us to shorten, not really wholly on an attachment.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: How to use AND & IF and shorten a long formula

    Explain in WORDS how the terms "successful", "closer", etc. relate to the H1/H2/H3 lookup table. This requires a simple INDEX MATCH MATCH, I think.

  4. #4
    Forum Contributor
    Join Date
    04-22-2017
    Location
    AU
    MS-Off Ver
    Microsoft 365
    Posts
    291

    Re: How to use AND & IF and shorten a long formula

    OK

    Here is the Formula I am using

    Looking for a shorter version please

    '=IF(AND(B6="H1",B13="Closer"),$D$19,IF(AND(B6="H1",B13="Successful"),$D$20,IF(AND(B6="H1",B13="Try Again"),$D$21,IF(AND(B6="H2",B13="Closer"),$E$19,IF(AND(B6="H2",B13="Successful"),$E$20,IF(AND(B6="H2",B13="Try Again"),$E$21,IF(AND(B6="H3",B13="Closer"),$F$19,IF(AND(B6="H3",B13="Successful"),$F$20,IF(AND(B6="H3",B13="Try Again"),$F$21,"")))))))))

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: How to use AND & IF and shorten a long formula

    Explain in WORDS what the formula is doing, please. I don't have time to back-engineer it to find out - sorry. Also, please answer my question in post #3, which you may not have seen.

  6. #6
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: How to use AND & IF and shorten a long formula

    Based on what I see I would use

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I added the possible outcomes of B13 in C column. If the order is different just change it as needed
    The first D-F range are all possible outcomes, the first match finds the row in the D-F range where the chosen comment is, the second match finds the column where the type of fire is.
    Attached Files Attached Files

+ 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] How to shorten Too Long Countif formula
    By putraguevara in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 01-10-2019, 04:12 PM
  2. [SOLVED] [SOLVED] formula too long, not sure how to shorten
    By Jane in forum Excel Formulas & Functions
    Replies: 22
    Last Post: 01-18-2016, 11:54 PM
  3. Shorten very long vlookup formula
    By pframpton in forum Excel General
    Replies: 2
    Last Post: 08-27-2015, 09:42 AM
  4. Long formula, need to shorten
    By BlairStevenson in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-06-2014, 12:23 PM
  5. [SOLVED] Too Long formula to shorten help
    By lapot in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 03-14-2014, 07:51 AM
  6. [SOLVED] Shorten a very long Formula
    By Floydlevedale in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-15-2013, 09:39 AM
  7. [SOLVED] Shorten the long text
    By Solomon14all in forum Excel General
    Replies: 7
    Last Post: 09-15-2012, 05:43 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