Selecting Text Between Commas in Excel

Hello everybody,

I have data in an excel cell setup as follows:
unimportantData, dataToBeExtracted, unimportantData2, unimportantData3

I would like to extract the information "dataToBeExtracted", and had
considered using the MID function.  However, the string length of
dataToBeExtracted is different for each row.  Is there a way to get
Excel to read all data after the first comma, but before the second
(without a bunch of IF((MID,#,#)=",")'s that is (unless that's the best
way!))?

Thanks in advance for your help.  Have a great day!
Brian

0
bdharvey (11)
11/28/2006 2:56:05 PM
excel 39879 articles. 2 followers. Follow

3 Replies
439 Views

Similar Articles

[PageSpeed] 16

You can use that or data>text to columns>or a macro using instr

-- 
Don Guillett
SalesAid Software
dguillett1@austin.rr.com
"Brian" <bdharvey@gmail.com> wrote in message 
news:1164725765.473627.31260@j72g2000cwa.googlegroups.com...
> Hello everybody,
>
> I have data in an excel cell setup as follows:
> unimportantData, dataToBeExtracted, unimportantData2, unimportantData3
>
> I would like to extract the information "dataToBeExtracted", and had
> considered using the MID function.  However, the string length of
> dataToBeExtracted is different for each row.  Is there a way to get
> Excel to read all data after the first comma, but before the second
> (without a bunch of IF((MID,#,#)=",")'s that is (unless that's the best
> way!))?
>
> Thanks in advance for your help.  Have a great day!
> Brian
> 


0
dguillett1 (2487)
11/28/2006 3:07:48 PM
That's fantastic!  Thanks so much Don.

Cheers,
Brian

Don Guillett wrote:
> You can use that or data>text to columns>or a macro using instr
>
> --
> Don Guillett
> SalesAid Software
> dguillett1@austin.rr.com
> "Brian" <bdharvey@gmail.com> wrote in message
> news:1164725765.473627.31260@j72g2000cwa.googlegroups.com...
> > Hello everybody,
> >
> > I have data in an excel cell setup as follows:
> > unimportantData, dataToBeExtracted, unimportantData2, unimportantData3
> >
> > I would like to extract the information "dataToBeExtracted", and had
> > considered using the MID function.  However, the string length of
> > dataToBeExtracted is different for each row.  Is there a way to get
> > Excel to read all data after the first comma, but before the second
> > (without a bunch of IF((MID,#,#)=",")'s that is (unless that's the best
> > way!))?
> >
> > Thanks in advance for your help.  Have a great day!
> > Brian
> >

0
bdharvey (11)
11/28/2006 3:34:12 PM
One way:

    =MID(LEFT(A1,FIND("#",SUBSTITUTE(A1,",","#",2))-1), FIND(",",A1)+1, 
255)

where 255 is just a large enough number to contain the data.

In article <1164725765.473627.31260@j72g2000cwa.googlegroups.com>,
 "Brian" <bdharvey@gmail.com> wrote:

> Hello everybody,
> 
> I have data in an excel cell setup as follows:
> unimportantData, dataToBeExtracted, unimportantData2, unimportantData3
> 
> I would like to extract the information "dataToBeExtracted", and had
> considered using the MID function.  However, the string length of
> dataToBeExtracted is different for each row.  Is there a way to get
> Excel to read all data after the first comma, but before the second
> (without a bunch of IF((MID,#,#)=",")'s that is (unless that's the best
> way!))?
> 
> Thanks in advance for your help.  Have a great day!
> Brian
0
jemcgimpsey (6723)
11/28/2006 3:52:00 PM
Reply:

Similar Artilces:

Added text to equations
I have a need to add text to a formula that references another cell. Say on one worksheet, I have a column of text from January to December Also, I have worksheets named from January to December. I hav multiple cell references for each worksheet, but they are always th same cell for each worksheet, i.e. January!A1, February!A1, etc. How can I reference these cells without typing in the January! part (o selecting them from each sheet). Ideally, I would like to be able t point to a cell and effectively say add a cell reference to it and hav it return the value of that cell -- AT ----------...

Run report on multi selected records.
I try to make a report for a custom entity that works like the Account Summary: let's say that it's Customer's Inquiry Summary for entity Customer's Inquiry I made the report so that I'm able to run the report on Customer's Inquiry Form. But when I select multi records in the list of Customer's Inquiry and run report, only one record is show in one page of the the report. I would like to have the selected records appear in the report with each record on each page. How can I do this? ...

Combo box list selection based on earlier selection by user
HI, I have a form that has a combo box 1 (Product) that reads a the Product table and has a unique id attached to each product (RO#). There is a second combo box 2 that is RO#. Now what I would like to do is when a user selects a Product in combo box 1, the system should lookup the Product selected from combo box 1 and upload the corresponding RO# in the combo box 2 list. Now I am using both combo boxes as Unbound and in the combo box 2 I have the two columns Product and RO# - in the Criteria row of RO# I have the following: Like IIf([Forms]![xa_f_lookup]![RO#]=" ",[Forms]![x...

Excel user name
A while ago there was a thread here asking about excel user names - cant find it now but id like to know how i can create a MSGBOX that ca use names - for example the macro reads the excel user name, vlookup short (nick) name, then gives a more personalised message. Can anyone help? Thank -- Message posted from http://www.ExcelForum.com Hi msgbox application.username -- Regards Frank Kabel Frankfurt, Germany "LB79 >" <<LB79.1axkrc@excelforum-nospam.com> schrieb im Newsbeitrag news:LB79.1axkrc@excelforum-nospam.com... > A while ago there was a thread here askin...

Fast way to search many cells by column for text strings
Am looking for quick way to search for and list, a specified, given text string in all cells in a column, e.g. look for text string " E/G " Assume the target col is col A, data from row2 Put in B2: =ISNUMBER(FIND("E/G",A2)) Put in C2: =ISNUMBER(SEARCH("E/G",A2)) (FIND is case sensitive, SEARCH is not case sensitive) Select B2:C2 and fill down Put a label into B1:C1, then do an autofilter in B1 (or in C1) to filter out the rows with: TRUE, depending on whether search is to be case sensitive or not. -- Rgds Max xl 97 --- GMT+8, 1� 22' N 103� 45' E xd...

Check boxes to text 05-10-10
Is there any way to take information from check boxes that were selected and turn it in to text? I want to have multiple checkboxes to select, and add those selected values to the destription line. ex. checkboxes: red, blue, green Once you have selected, it would add to the header: "Order for lables: red, green" It is not clear what you are trying to do. A check box is simply that - a box which can be checked. If you want to insert some text based upon whether a check box in a protected form is checked, then see http://www.gmayor.com/SelectFile.htm -- <>...

Can't select objects in Excel 2007
I'm trying to create a form in Excel 2007, and although I can manipulate, copy & paste controls (check boxes, etc) I can't select multiple objects to align them, etc. I've checked on-line help (and have followed the instructions), and other websites, but no one seems to have indicated a problem. It is extremely cumbersome and I need a solution. Any ideas? Thanks in advance, Jim Berglund I know this is about a year too late, but it may help others who have stumbled across this page looking for similar help. On the Home tab, in the Editing group, click Find & Select....

Excel Comments Indicators when viewed in IE
Hello I have two workbooks that have been published and viewed in Internet Explorer. Both work books have comments set in various cells. However the first one worked fine and when I view this in IE it shows as a small little red character allowing me to still see the contents of the cell. However on the second sheet all done in the same way when I view the comments in IE it shows as something similar to this [_] in purple. This unfortunatly covers up the contents of the cell. Anyone got any ideas why this is happening and how I can change it?? Thanks... Robin ...

Lot Selection not Showing when I select PO on Receiving Entry
Usually, the Lot selection screen would pop up when I select a PO at the Line Detail of the Receivings Entry, now it does not! And GP will let items post without a lot number! It seems as if a setting has changed. Any ideas anyone? Any help is appreciated. Thanks, R Are you sure the item is marked to track lots? This wiould be set item by item on the Item Maintenance Options window. -- Richard L. Whaley Author / Consultant / MVP 2006-2008 Documentation for Software Users Get our Free Tips and Tricks Newsletter and check out our books at http://www.AccoladePublications.com &q...

Select contact then hangs
Hi, please help. I have a user that when she selects a contact using To: in a new email, after selecting 2, it closes outlook??. Spec is W2kSP4\office2k with all windows updates and office updates installed. Profile has been deleted and re-created, plus i have set up personal folders and moved contacts into there, and set that folder as a default, but makes no difference. Please help. ...

"Disk is full" error when opening Excel 2000.
I am getting a "disk is full" error when opening MS Excel on my laptop (not connected to any servers/LAN). I am running Windows 2000 and my Excel version is 2000 as well. Additionally I can not open MS Word or Adobe Acrobat either as these applications are giving errors that it can not find the file. Have others experienced this and if so, do you know of a solution for fixing it? ...

Selecting rows from various sheets
Hi all, I have several sheets with a few columns in each. One colum in each sheet has a unique value. Most of these unique values are th same in each sheet but not all. Is there any way that I can set up new sheet that will have the unique value in column 1 and th corresponding column values frommeach sheet beside it. For example Sheet 1 aa 1 1 1 bb 2 2 2 cc 3 3 3 Sheet 2 aa 4 4 cc 5 5 Result aa 1 1 1 4 4 bb 2 2 2 cc 3 3 3 5 5 Thanks alot, Sha -- sha ----------------------------------------------------------------------- shav's Profile: http...

Nudging Text Boxes in a Chart
Has anyone found a way to "nudge" data labels in a PPT chart? I know I can move them by clicking and dragging but when I try to use the arrow keys (as I do for objects) the cursor tabs to other areas in the chart. And when clicking and dragging the labels they seem to snap to a grid and I have very limited control over them. Thanks for any insights!! -- Trisha H No one has to "find a way", there are already several standard ways to accomplish that. :o) Turn off the "Snap Objects to Grid" (in 2003 View, Grid and Guides) or in that same loca...

numbering text boxes?
Is there a way to number text boxes in a document? I'm trying to create coupons that I can number, putting 3 to a page, so I'd need to number the text boxes rather than the pages. Mail merge... Setup a data base list with numbers. Lots of help here Mail merge http://office.microsoft.com/en-us/publisher/CH010504371033.aspx -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Lisa" <Lisa@discussions.microsoft.com> wrote in message news:5D77331E-3B4A-47B4-BC9B-50FA4E883555@microsoft.com... > Is there a way to nu...

Issue Copying Merged Cell Text
Does anyone know why copying text from a merged cell into another application (ie: the password field of a web site) copies additional blank characters. Is there a way to copy only the actual contents of the merged cell? CinCode5, You can save time when working with merged cells: 1. Get angry first. 2. Don't use them. The second is the option that most folks have come to use. Merged cells cause some problems, and often down the road when you don't suspect they're the cause. -- Earl Kiosterud mvpearl omitthisword at verizon period net --------------------------------------...

Differences between VBA in Excel 2007-2010
Is there anywhere I can view a list of the changes (if any) made to the object model between Excel 2007 and 2010? I have a couple of business-critical macros which I've been maintaining for some time - when we moved from 2003 to 2007 it was quite painful since some of the code was no longer working as it should and I had to re-write large sections. Now we're moving to 2010 I'm hoping there's a reference I can use to get an idea of what's changed and how much work is likely to be involved. Thanks, Tara Have you looked at this? http://msdn.microsoft.com/e...

Replace text
I have a column of names. On any cell that ENDS with a space followed by a single character (regardless of what it is)I want to remove the space and character. Ex: Williams, Henry B would change to Williams, Henry Hi! =if(mid(A1,len(A1)-1=" "), left(A1,len(A1)-2),A1) Al -- Message posted from http://www.ExcelForum.com Assuming your data in Col A, in cell B1 put the following formula and copy down =IF(ISERROR(SEARCH(" ?",RIGHT(A1,2))),A1,LEFT(A1,LEN(A1)-2)) Then copy the data in Col B, paste special as values over A and delete Col B -- Regards Ken...

Excel 2000
I used to have this option by right clicking and selecting split. However i don't have it now. I had it on WIN2000 and now I have XP proffesional Hi not possible in Excel -- Regards Frank Kabel Frankfurt, Germany "Roy S" <Roy S@discussions.microsoft.com> schrieb im Newsbeitrag news:BE9E61EA-466E-4391-8400-5967977E9325@microsoft.com... > I used to have this option by right clicking and selecting split. However i > don't have it now. I had it on WIN2000 and now I have XP proffesional I bet you're thinking about a table in MSWord???? Roy S wrote: > &g...

select text in Calendar
I'm working on a calendar in Publisher. I'm adding text into a cell by spacing down 1 point, then typing in 8 points. Doing fine until April. At that time, I can only select cells (whole days). It will not let me select the text. Help is no help. Any hints out there. Did I accidentally select something to do this? Bonnie Have you added a picture to the cell or a shape? If you have send it to the back, make the cell no fill and try again. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "GoBonnieGo" <GoB...

Masks in Excel
I would like to create a mask of some sort in Excel. Suppose I have written in one cell "10seconds" and I would like to use the value 10 from this cell in a formula in a different cell. Is there any way I could mask out the "seconds" in order to just use the numeric value? Any help would be great... Thanks! If you were to have a space between the number and the text then you could use: =--LEFT(A1,FIND(" ",A1)) to extact the number. You can then use it is a calculation like: ==--LEFT(A1,FIND(" ",A1))*B1 -- HTH Sandy In Perth, the ancient...

macro to filter data based on selected data
Hi, I am looking for a macro that requests input of a reference code and then a date and then filters the data in my spreadsheet based on this criteria. I am using excel 2007. Any help with this will be greatly appreciated. You can probably record a macro while doing it manually and then clean it up and add input boxes to ask the question or input your variable in a cell and use that. If all else fails, If desired, send your file to my address below. I will only look if: 1. You send a copy of this message on an inserted sheet 2. You give me the newsgroup and the ...

Excel and Laptops
I have been developing data processing algorithms using Excel VBA on my pc and want to update to a laptop for reasons of mobility, but am unsure about runtimes. My Athlon 1.4Ghz (256RAM) runs a test file in 12 secs using Excel 2000 (17secs with Excel 2003). No graphics are used. I need the laptop to run at least as fast so can anyone identify the relevent parameters, point me at a benchmark performance table, ar recommend a siutable machine please. Thanks -- astrikor ------------------------------------------------------------------------ astrikor's Profile: http://www.excelforum.com...

Multiple excel sheets with same headings
I have 14 sheets with me for 14 different users. Now I want the data to come out of it for each person. The sheets are titled by the names of the individuals. Can MS Query be used for this? If yes, how? If not, then what shall I do? -- mohitmahajan ------------------------------------------------------------------------ mohitmahajan's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=8130 View this thread: http://www.excelforum.com/showthread.php?threadid=470132 ...

Outlook displaying HTML weirdly and attachments as plain text?? Help.
Hi, All of a sudden my SBS 2003 box is passing me emails from people who are sending me email in HTML format but I see it like this: This is a multi-part message in MIME format. ------_=_NextPart_001_01C89B01.1EE51FF9 Content-Type: multipart/alternative; boundary="----_=_NextPart_002_01C89B01.1EE51FF9" ------_=_NextPart_002_01C89B01.1EE51FF9 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Attachments appear like this: ------_=_NextPart_001_01C89B01.1EE51FF9 Content-Type: application/vnd.ms-excel; name="ACCORD 2007-8....

Link select with a blast
I have Win 7 Home Premium, x64. Quite often, when I select a link, a mouse pointer changes to a palm with a blast. I understand, the palm is the standard mouse pointer for link select, but what is the blast? What it indicates? -- Ilya Zeldes Fort Myers, Florida Hi Ilya, I suspect that this is being caused by a tracking program. Run something like Ad-Aware and see if it indicates a tracking company. If so, you can delete it, however, it might prevent you from accessing that particular website. Dave "Ilya Zeldes" wrote in message news:7A6FF9B1-5512-44...