+ Reply to Thread
Results 1 to 11 of 11

Need help to modify a mid/index formula-need text instead of error #N/A

  1. #1
    Registered User
    Join Date
    01-01-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    15

    Need help to modify a mid/index formula-need text instead of error #N/A

    Hi all,
    I have this formula in row 14 (see below)...what this does is if I type the word "PREC" anywhere between I25 and I48 then cell I14 will populate with the correct initials. However, sometimes I don't need the word "PREC" in every column and when I delete the word "PREC" the cells in row 14 get an error #N/A. Is there a way to modify this formula so the cells in row 14 will populate with "0 RES" when I do not need "PREC" in the column instead of the error message?

    =MID(INDEX($C$25:$C$48,MATCH("PREC",I$25:I$48,0)),2,2)

    Thanks
    Attached Files Attached Files
    Last edited by SerraAngel; 01-02-2013 at 02:31 AM.

  2. #2
    Registered User
    Join Date
    01-01-2013
    Location
    melbourne, Australia
    MS-Off Ver
    Excel 2007
    Posts
    55

    Re: Need help modifying a formula

    =iferror(mid(index($c$25:$c$48,match("prec",i$25:i$48,0)),2,2),"0 res")

  3. #3
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Need help modifying a formula

    Hi Serra,

    Suggest you to change the thread title to reflect the query you are asking - may be you can mention formula name / logic issue in title line. thanks.

    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  4. #4
    Registered User
    Join Date
    01-01-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    15

    Re: Need help modifying a formula

    Quote Originally Posted by rossg View Post
    =iferror(mid(index($c$25:$c$48,match("prec",i$25:i$48,0)),2,2),"0 res")
    Sorry that formula is giving me an error message

  5. #5
    Registered User
    Join Date
    01-01-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    15

    Re: Need help modifying a formula

    Quote Originally Posted by dilipandey View Post
    Hi Serra,

    Suggest you to change the thread title to reflect the query you are asking - may be you can mention formula name / logic issue in title line. thanks.

    Regards,
    DILIPandey
    <click on below * if this helps>
    Can you tell me how to change the title of the thread?

  6. #6
    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,939

    Re: Need help modifying a formula

    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    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

  7. #7
    Registered User
    Join Date
    01-01-2013
    Location
    melbourne, Australia
    MS-Off Ver
    Excel 2007
    Posts
    55

    Re: Need help modifying a formula

    did you paste that formula into "I14" ?

    it works fine in my doc, even when copied off the forum..
    Attached Files Attached Files

  8. #8
    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,939

    Re: Need help modifying a formula

    rossg...Your post does not comply with Rule 7 of our Forum RULES. Please do not ignore Moderators' or Administrators' requests - note that this includes requests by senior members as well, if you are unclear about their request or instruction then send a private message to them asking for help. Do not post a reply to a thread where a moderator has requested an action that has not been complied with e.g Title change or Code tags...etc

  9. #9
    Registered User
    Join Date
    01-01-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    15

    Need help to modify a mid/index formula-need text instead of erro r#N/A

    Quote Originally Posted by rossg View Post
    did you paste that formula into "I14" ?

    it works fine in my doc, even when copied off the forum..
    I am using excel 2003. When I open the file you posted the formula doesn't work.

  10. #10
    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,939

    Re: Need help to modify a mid/index formula-need text instead of error #N/A

    you uploaded a file with a .xlsx extension. that file can only come from excel 2007 or later. was that file created on another PC, or given to you by someone???

    the following formula will show an "epmty" cell, using 2003...

    =IF(ISERROR(MID(INDEX($C$25:$C$48,MATCH("PREC",I$25:I$48,0)),2,2)),"",MID(INDEX($C$25:$C$48,MATCH("PREC",I$25:I$48,0)),2,2))

  11. #11
    Registered User
    Join Date
    01-01-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    15

    Re: Need help to modify a mid/index formula-need text instead of error #N/A

    Quote Originally Posted by FDibbins View Post
    you uploaded a file with a .xlsx extension. that file can only come from excel 2007 or later. was that file created on another PC, or given to you by someone???

    the following formula will show an "epmty" cell, using 2003...

    =IF(ISERROR(MID(INDEX($C$25:$C$48,MATCH("PREC",I$25:I$48,0)),2,2)),"",MID(INDEX($C$25:$C$48,MATCH("PREC",I$25:I$48,0)),2,2))
    Thank you so much for your help...that works perfectly! I have both 2003 and 2007 at work so I must have created it in 2007, but I use 2003 at home.

+ 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