+ Reply to Thread
Results 1 to 3 of 3

MID formula

  1. #1
    Registered User
    Join Date
    04-26-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    1

    MID formula

    Hi everyone! I just need a little help. I was given this formula =IF(MID(A21,13,3)="DA1","yes",IF(MID(A21,13,3)="D01","yes","no")) and the question is this "The formula in cell C21 show be indicate yes if the data on cell A21 contains DA1. Correct the formula" the data in A21 is R2D2ETR2X2N9D01DA1ZQB631. Can anyone explain to me this formula? a big thanks!

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,318

    Re: Badly need help regarding a formula

    Hello & Welcome to the Board,

    Excel help does a great job not only explaining this function but many others

    =MID(text,start_num,num_chars)

    Look at A21 >> start at number 13 >> length - three characters >> does it equal your sought after value

    Another useful tool is Evaluate formula
    HTH
    Regards, Jeff

  3. #3
    Forum Contributor tkowal's Avatar
    Join Date
    11-20-2010
    Location
    Miami, Fl
    MS-Off Ver
    Excel 2010
    Posts
    150

    Re: Badly need help regarding a formula

    Your formula only checks character position 13 for a length of 3 characters: In your examples the 13th character is D length of 3 makes it "D01".

    substituting the MID(....) for above "D01":

    =if("D01" = "DA1","yes",If("D01" = "D01"),"yes","no")
    so in you example the result will be "yes"

    As for correcting it we would need to know the rules for yes and no.
    Ted
    "Live Long and Prosper"

+ 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