+ Reply to Thread
Results 1 to 4 of 4

Nested if function given specific criteria?

  1. #1
    Registered User
    Join Date
    01-15-2015
    Location
    california
    MS-Off Ver
    Newest
    Posts
    23

    Nested if function given specific criteria?

    Hi guys,

    I have this working formula:
    =IFERROR(INDEX(R9:R6404,MATCH(1,(V9:V6404=D4)*(Q9:Q6404=D6),0)),"")

    Producing a string of characters such as:
    CSFS2I04
    CSFS1I04

    The fourth character from the right will either be a 1 or a 2, always. It will be the fourth character from the right, always.

    If it is a 2, I want the function to replace it with a 1. Can someone think of a way to make that happen?

    Thanks!
    Last edited by tonyridino; 01-27-2015 at 09:21 PM.

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

    Re: Nested if function given specific criteria?

    Try this, assuming your result is in cell A1:

    =IF(LEFT(RIGHT(A1,4))="2",LEFT(A1,FIND("2",A1)-1)&"1"&RIGHT(A1,3),A1)

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    01-15-2015
    Location
    california
    MS-Off Ver
    Newest
    Posts
    23

    Re: Nested if function given specific criteria?

    Hi Pete,
    That looks great. Could you help me nest it inside the function I already have?
    And the cell is G6.

    Thanks

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

    Re: Nested if function given specific criteria?

    I think this is an example where having the formula in a separate cell (e.g. H6) would be better, as there are 5 references to A1 in my formula - you would have to replace all those references by this:

    INDEX(R9:R6404,MATCH(1,(V9:V6404=D4)*(Q9:Q6404=D6),0))

    (which is part of your existing formula), and then wrap the whole expanded formula with:

    =IFERROR( expanded_formula ,"")

    but it would be a lot easier if you put my formula in H6 and just changed A1 to G6 (5 times), and maybe put IF(G6="","", in front of it and an extra bracket at the end.

    Hope this helps.

    Pete

+ 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] Nested Sumif's or how to sum data based on nested criteria
    By dlietz in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-07-2014, 11:36 AM
  2. [SOLVED] Nested IF function with multiple criteria
    By Kalergi in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-12-2013, 07:50 AM
  3. Index Matching with a nested Greater than function for multiple criteria
    By Solpics in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-05-2012, 12:22 AM
  4. Nested if function with multiple criteria
    By argandoz in forum Excel General
    Replies: 5
    Last Post: 07-28-2011, 08:44 PM
  5. Replies: 7
    Last Post: 09-06-2009, 03:23 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