+ Reply to Thread
Results 1 to 6 of 6

How to shorten If formula?

  1. #1
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    How to shorten If formula?

    Hi,

    Please help me to shorten this formula. I think to use ‘Or’ function here but confused. The cell reference ‘F5’ on sheet1 is static/unchanged so I want to avoide its repeated use in formula. It increases the length of the formula.

    Please Login or Register  to view this content.
    Any help will be appreciated.

    Thanking you.
    Sincerely,

    mso3

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: How to shorten If formula?

    It looks like you are only looking for 2 choices from F5 (apart from H8/J8 being blank), so maybe this...
    =IF(OR(Sheet1!H8="",J8=""),"",IF(Sheet1!$F$5="Std. 9 A",Sheet1!H8,Sheet1!J8))

    If you are testing to see if either are blank, then the above will work

    Another option (you will need to test this) would be...
    =IF(Sheet1!$F$5="Std. 9 A",Sheet1!H8,Sheet1!J8)
    If H8 is blank, thats the answer you will get, if the criteria is met
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: How to shorten If formula?

    Not sure of the syntax you're using there but if these are all the possible combinations I'd be tempted to do something like this

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: How to shorten If formula?

    Hi Fort,
    Thank you. The second formula is working fine as per my requirement.

    Thank you.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: How to shorten If formula?

    you'r welcome. If this answered your question, please take a moment to mark the thread as "solved" - it helps keep things neat and tidy lol, and consider adding the reputation to those that helped (see points 2 & 3 below my 1st post to you)

  6. #6
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: How to shorten If formula?

    Hi Crooza,
    Thank you. It's also working fine as per my requirement.

    Thank you and have a nice day.

+ 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. How can i shorten my formula
    By Naiomi in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-12-2008, 05:42 PM
  2. Shorten Formula
    By calli in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 08-15-2008, 01:51 PM
  3. Shorten an IF formula
    By Joker in forum Excel General
    Replies: 4
    Last Post: 12-10-2005, 08:35 AM
  4. [SOLVED] shorten formula
    By PACable in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-26-2005, 08:05 PM
  5. Trying to shorten (or use new) formula
    By Monk in forum Excel General
    Replies: 1
    Last Post: 06-29-2005, 02:05 PM

Tags for this Thread

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