+ Reply to Thread
Results 1 to 7 of 7

Help with MID Formula

  1. #1
    Registered User
    Join Date
    11-23-2016
    Location
    Brisbane, Australia
    MS-Off Ver
    2015
    Posts
    3

    Thumbs up Help with MID Formula

    Hi all,

    I have some questions that can either be set out with a : or a ?
    If the question is
    Was this reported: Yes
    I use the formula = MID(A7,FIND(":",A7)+2,(LEN(A7))) so that the cell adjacent can extract just the word Yes

    If the question is
    Were there any animals? There was a dog and a cat
    I use the formula = MID(A29,FIND("?",A29)+2,(LEN(A29))) so that the cell adjacent can extract just the response There was a dog and a cat

    I'm having trouble combining the two formulas so that regardless of if it is a : or a ? it will still extract the answer/response into the adjacent cell.
    Can someone please help me with making this work?

    Thanks heaps in advance
    Last edited by soniasyc; 11-23-2016 at 11:36 PM.

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Help with MID Formula

    Assuming string is in A1
    Enter formula in B1 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B
    1 Was this reported: Yes Yes
    2 Were there any animals? There was a dog and a cat There was a dog and a cat
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Help with MID Formula

    Hi soniasyc and welcome to the forum.

    If you upload an Excel workbook file with sample data (not pictures or screen shots please) it will be easier and you usually get more and faster response.

    Please be sure to desensitize the data.


    To do so follow these steps.
    • To attach a file to your post,
    • click “Go Advanced” (next to Post Quick Reply – bottom right),
    • scroll down until you see “Manage Attachments”, click that,
    • click “Browse”.
    • select your file(s)
    • click “Upload”
    • click “Close window”
    • click “Submit Reply”
    • The file name will appear at the bottom of your reply.
    Dave

  4. #4
    Registered User
    Join Date
    11-23-2016
    Location
    Brisbane, Australia
    MS-Off Ver
    2015
    Posts
    3

    Re: Help with MID Formula

    Thank you AlKey
    That seemed to work however, if there is a time in the answer eg. 12:30pm it would only provide 30pm in the adjacent cell, is there a way around this?
    I've attached a sample workbook as per FlameRetired's suggestions.
    Thanks
    Attached Files Attached Files

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Help with MID Formula

    Then this
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B
    1 Was this reported? Yes Yes
    2 Time of report: 8 : 30 AM 8 : 30 AM
    3 Action taken: Letter generated Letter generated
    4 Has a letter been sent? No No
    5 Has a response been received? No No

  6. #6
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,908

    Re: Help with MID Formula

    Or try this ...

    =MID(A1,FIND(":",SUBSTITUTE(A1,"?",":"))+2,LEN(A1))

  7. #7
    Registered User
    Join Date
    11-23-2016
    Location
    Brisbane, Australia
    MS-Off Ver
    2015
    Posts
    3

    Thumbs up Re: Help with MID Formula

    Thank you so much AlKey, that works perfectly.
    Really appreciate your help with that

+ 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: 11
    Last Post: 06-06-2014, 03:34 PM
  2. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 04:06 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