+ Reply to Thread
Results 1 to 5 of 5

If and choose formulas combined?

  1. #1
    Registered User
    Join Date
    06-03-2015
    Location
    surrey
    MS-Off Ver
    13
    Posts
    2

    If and choose formulas combined?

    Hello,
    Is it possible to write a formula that will - depending on the number in a cell - choose a particular IF formula
    e.g.
    if cell A5 = 6
    Then in another cell - say F26 use this formula (below) which relates to another value in another cell (F25)
    in cell =IF(F25>4.4,"C+",IF(F25>3.5,"C6", IF(F25>2.5,"C5",IF(F25>1.5,"C4","C1-3"))))

    But if cell A5 = 5
    Then apply a different formula in cell F26
    =IF(F25>4.4,"B+",IF(F25>3.5,"B6", IF(F25>2.5,"B5",IF(F25>1.5,"B4","B1-3"))))

    Any help would be appreciated

    Cheers

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,800

    Re: If and choose formulas combined?

    You could put this in F26:

    =IF($A$5=6,IF(F25>4.4,"C+",IF(F25>3.5,"C6", IF(F25>2.5,"C5",IF(F25>1.5,"C4","C1-3")))),IF($A$5=5,IF(F25>4.4,"B+",IF(F25>3.5,"B6", IF(F25>2.5,"B5",IF(F25>1.5,"B4","B1-3")))),"n/a"))

    Not sure why you have quotes around the cell references - I've left them in.

    Hope this helps.

    Pete

  3. #3
    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,946

    Re: If and choose formulas combined?

    Hi, welcome to the forum

    Perhaps this...
    =IF(A5=6,IF(F25>4.4,"C+",IF(F25>3.5,"C6", IF(F25>2.5,"C5",IF(F25>1.5,"C4","C1-3")))),IF(F25>4.4,"B+",IF(F25>3.5,"B6", IF(F25>2.5,"B5",IF(F25>1.5,"B4","B1-3")))))

    However, you can simplify this with a small table and a vlookup()...
    E
    F
    G
    1
    5
    6
    2
    0
    B1-3 C1-3
    3
    1.5
    B4 C4
    4
    2.5
    B5 C5
    5
    3.5
    B6 C6
    6
    4.4
    B+ C+

    =VLOOKUP(F25,$E$2:$G$6,MATCH($A$5,$E$1:$G$1,0),1)
    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

  4. #4
    Registered User
    Join Date
    06-03-2015
    Location
    surrey
    MS-Off Ver
    13
    Posts
    2

    Re: If and choose formulas combined?

    Pete

    That works!

    Cheers

  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,946

    Re: If and choose formulas combined?

    Here is a shortened version of that same IF statement...
    =IF(A5=6,"C","B")&IF(F25>4.4,"+",IF(F25>3.5,"6", IF(F25>2.5,"5",IF(F25>1.5,"4","1-3"))))

+ 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. Replies: 3
    Last Post: 11-09-2014, 11:09 AM
  2. IF Formulas Combined w/Data Validation
    By howe7032 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-22-2014, 02:44 PM
  3. Print Macro combined with index and small formulas
    By giscosta_br in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-06-2014, 03:58 AM
  4. [SOLVED] Choose between Different Formulas in one Cell
    By mdoverl in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-29-2014, 02:32 AM
  5. can Substitute formulas be combined?
    By go3go3go in forum Excel General
    Replies: 2
    Last Post: 02-28-2007, 06:24 AM

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