Numbers '09: Extract first word of a cell

I'm looking for a formula that extracts the first word out of text in a cell and displays it in another cell.
Eg, in Cell A1 I have the text "Bob likes to swim". I want "Bob" to appear in another cell.
I've found a solution for Excel, but it doesn't transfer to Numbers.
Any ideas?

Hello,
I have a contact list that I am trying to sort out and I need to separate first and last name.
The formula given here was great for first names, but I am having trouble with the last name:
Using this formula
{quote}=RIGHT(O3;FIND(" ";O3)-2){quote}
where O2 is the cell where I have my full name, gives any kind of truncated names, depending on the length of the first name. I have tried any variation for the last term (-2), but nothing satisfactory.
Now I have found this excel formula that I am trying to adapt to numbers:
{quote}=RIGHT(A1,LEN(A1)-FIND("*",SUBSTITUTE(A1," ","*",LEN(A1)-LEN(SUBSTITUTE(A1," ","")))))
which should become something like that in my case:
=RIGHT(O2;LEN(O2)-FIND("*",SUBSTITUTE(O2;" ";"*";LEN(O2)-LEN(SUBSTITUTE(O2;" ";"")))))
if I am not mistaken about the change from commas to semi-colon
{quote}
Any idea to what I should do ? Ideally, what I would like to have is a formula that extracts everything that is after the first word, so as to manage the name with particle and/or the middle names....
Thanks for your attention,
Colin

Similar Messages

  • How can I do Count the Words in a cell with Numbers?

    I'm producing a documentary, with a long list of captions. I was hoping using numbers to organize the captions in sequence. them take the word count and do a simple calculation to work out the numbers of frames required per caption, based on a certian numbers of words per minute.
    I can handle calculations, but can't figure out how/if numbers can count the whole words in a cell and pass that on to a formula.
    I count them manually, but the nature of the script means the captions are being constantly updated.
    Any help appreciated!

    Clever. The only additional suggestion is to use the function Trim() just in case there are extra spaces between the words.
    =LEN(TRIM(B))-LEN(SUBSTITUTE(B," ",""))+1
    Rob

  • Extract First letter from each word

    Hi All,
    I have a requirement to extract first letter of each word as shown in below example
    input: abcd output: a
    input: abcd efgh output: ae
    input: abcd efgh ijkl output: aejany help will be highly appreciated
    I am on db version 11g

    jeneesh wrote:
    Just a note - This will not take care of spaces at the end of the line..You're right, and not just spaces but any non-word characters. Here is fixed solution:
    with t as (
               select 'abcd ' str from dual union all
               select 'abcd efgh.' from dual union all
               select 'abcd efgh ijkl,' from dual union all
               select ' a abcd efgh ijkl! ' from dual
    select  str,
            '[' || regexp_replace(str,'\W*(\w)(\w*)|(\W*$)','\1') || ']' initials
      from  t
    STR                 INITIALS
    abcd                [a]
    abcd efgh.          [ae]
    abcd efgh ijkl,     [aei]
    a abcd efgh ijkl!  [aaei]
    SQL> BTW, oldie_63's solution takes care of spaces but not:
    with t as (
               select ' abcd' str from dual union all
               select '.abcd efgh' from dual union all
               select ',abcd efgh ijkl' from dual union all
               select '! a abcd efgh ijkl' from dual
    select  str,
            '[' || trim(regexp_replace(str,'(\S)\S*\s*','\1')) || ']' initials
      from  t
    STR                INITIALS
    abcd              [a]
    .abcd efgh         [.e]
    ,abcd efgh ijkl    [,ei]
    ! a abcd efgh ijkl [!aaei]
    SQL> Also, OP needs to clarify what to do with hyphenated words:
    SQL> with t as (
      2             select 'sugar-free' str from dual
      3            )
      4  select  str,
      5          '[' || regexp_replace(str,'\W*(\w)(\w*)|(\W*$)','\1') || ']' initials
      6    from  t
      7  /
    STR        INITIALS
    sugar-free [sf]
    SQL> with t as (
      2             select 'sugar-free' str from dual
      3            )
      4  select  str,
      5          '[' || trim(regexp_replace(str,'(\S)\S*\s*','\1')) || ']' initials
      6    from  t
      7  /
    STR        INITIALS
    sugar-free [s]
    SQL>Or words like:
    SQL> with t as (
      2             select 'O''Reily' str from dual
      3            )
      4  select  str,
      5          '[' || regexp_replace(str,'\W*(\w)(\w*)|(\W*$)','\1') || ']' initials
      6    from  t
      7  /
    STR     INITIALS
    O'Reily [OR]
    SQL> with t as (
      2             select 'O''Reily' str from dual
      3            )
      4  select  str,
      5          '[' || regexp_replace(str,'\W*(\w)(\w*)|(\W*$)','\1') || ']' initials
      6    from  t
      7  /
    STR     INITIALS
    O'Reily [OR]
    SQL> SY.

  • Script to get the first word on each page

    Is there a script that would make a list of the first word of each page (or, preferably, create a text box on each page and place the next page's word in that)? My document's all in one story with one text frame on each page, although there are several other frames (header, page number) applied through master pages.

    You wrote:  I changed the numbers to "8.0425in",  "4.5681in",  "8.1275in", "5.4319in" and it mostly worked - it placed the box at exactly 5 inches (X) and at 8.085 inches (Y) instead of 4.5681 inches. Any idea why?
    No. I cannot reproduce the error you describe. I assume you've checked your numbers very closely in the script--I don't normally indicate measurements as strings.
    you wrote: Something wasn't working with the styling - it kept freezing the program -
    What do you mean by "freezing the program"? Is there a specific error message?
    The paragraph style is named "firstword" and is all lowercase letters?
    firstword paragraph style is NOT in a paragraph style group, right?
    Is the first word on any page too long when formatted with the paragraph style "firstword" to fit in the text frame?

  • Delete the first word in a string?

    Hi, i have a code in which i can extract the first three words in a string. after it's found the three first words, i would like it to remove the first one, what could i add?
    this is what the code looks like:
    import java.util.regex.*;
    class Test187D {
         public static void main(String[] args) {
              String word1;
              String word2;
              String word3;
              String partDesc = "Hi my name is SandraPandra";
              Pattern pattern = Pattern.compile("^(\\w+)\\s+(\\w+)\\s+(\\w+)");
              Matcher matcher = pattern.matcher(partDesc);
              //Find the first word of the part desc
              if (matcher.find()) {
                   word1 = matcher.group(1);
                   word2 = matcher.group(2);
                   word3 = matcher.group(3);
                   System.out.println (word1 + " " + word2 + " " + word3);
    } Thank you in advance

    Take the length of the first word, plus one for the length of the space, that's how many characters to remove. Take the substring of the original string from the end of the removed part to the end of the whole string. Look up the String methods length(), and substring().

  • Extracting two words from the article in english

    i have an english article which is to be classified into a particular category based on the keywords. There are lacks of keywords stored in database. What i have to do is to obtain the keywords from the article and match it from the database. if match is found then the article belongs to that particular category. This keyword matching i did for one word by using split(" "), but now i want to do for 2 words from an article.that is getting 2 words from the article which is repeated many times.then searching it in the db.(here 2 words will be considered as one keyword)
    Now what i should do to get the two appropriate keywords from the article without taking a,am,the,is,when etc...(leaving many generic words).
    Any help will be appreciated.

    hi,
    thanks for reply!
    I know its a bad algorithm classify the article written in english only based on few words appearing in the article.
    But what i want to do is first extract the words from the article leaving the generic words, then count the single word each.Then i am sorting the words based on count and taking the five words from the article which has highest count. Now i have the database where millions of keywords are stored. These keywords are refering to particle category
    ie. if we consider a category as sports, then under this category i have many keywords stored in the database like cricket, football, worldcup,tennis... etc
    Now if i search the appropriate word from the article it will be considered as keyword. then this will be searched in the database. if match is found then it means the article belongs to sports category.
    Now problem is some times article can have two words which can be considered as one keyword and can be used to classify article in much better way.
    The question is how to get such words from the article???
    ex.. if Hero's Journey is combined word appearing many times in the article then this keyword can be used to classify the article much better than going for single word.
    Can anybody help me in this regard.
    Any help will be appreciated.

  • Function: Return First Line of Another Cell (before line break)

    Howdy all!
    I have a bunch of cells that have multiple lines (line breaks created by pressing option-return). I want to create a function that will return the first line of a cell (IE: the text before the first line break). Any thoughts on how to do this?
    IE, if A1=
    Test 1
    Test 2
    Test 3
    Then I want to point the function from another cell to A1 and have it return Test 1.
    The code would look like this:
    =REPLACE(A1,SEARCH([line break],A1),LEN(A1)−SEARCH([line break],A1)+1,"")
    (IE: It searches for the line break, then replaces everything from that part on with nothing.)
    The problem is that I don't know how to get Numbers to think about [line break]. Thought that =char() would work but I don't know the unicode to put in (85, 2028, and 2029 didn't work).
    Thoughts?
    Matthew

    Thanks, I thought that I had tried that at some point, but I guess I hadn't done it correctly!
    I made one adjustment, I subtracted one from the SEARCH. The formula as you have it actually returns the line break along with the first line (you can't see it in your example because your rows are taller). (I also removed the third peramiter from the SEARCH, but that is a personal preference.) Outside of that this works perfectly. Thanks!
    B1=LEFT(A1,SEARCH("
    ",A1)−1)
    Matthew

  • I am trying to highlights individual words in a cell, but the option "Highlight" is gray... any suggestions?

    As the titel says... I need to highlight some ords, but the option is gray no matter what I do. Any ideas?

    Hi Wolfgang,
    Numbers 3.1. Select the word in a cell:
    Format Panel > Text > Style > Font
    Click on the gear wheel > Character Fill Color
    And...
    I can't find a way to do this in Numbers '09
    Regards,
    Ian.

  • Modifying a filename using the first word contained in the document.

    Hi,
    I recovered around 2500 .doc files, lost in a drive fail (I know) and I've been trying to find a way to speed up the renaming process : I'm trying to create a macro that could grab the first characters, or first word of each file and replace Its filename with those characters. In a 2500-docs batch. I tried a lost of things, but am not sure if it's doable with Applescript.
    Help ?
    Thanks.

    There are no bells and whistles here - e.g. minimal error checking - but this should give the basic pattern for applescript. Copy it into the applescript editor, save it as an application, then drag&drop files onto the application.
    on open theFiles
              repeat with thisFile in theFiles
                        set thisPosixFile to POSIX path of thisFile
                        tell application "Microsoft Word"
                                  open thisFile
                                  tell document 1
                                            set wordOne to (get content of first word)
                                            close
                                  end tell
                        end tell
                        tell application "System Events"
                                  try
                                            set ext to name extension of disk item thisPosixFile
                                            set name of disk item thisPosixFile to wordOne & "." & ext
                                  on error errstr
                                            display dialog errstr
                                  end try
                        end tell
              end repeat
    end open

  • When downloading a file, only the first word of the attached file is included in the 'file name' field, not the entire file name, as it used to.

    Regardless of filetype, only the first word of the file is filled into the "Enter name of file to save to..." dialog box. I'm set up to 'save file' in the FF Options > Applications tab for the basic MS and Adobe files. To successfully use/find the downloaded file, I type in the remainder of the file name. Have I overlooked an additional setting? Running FF 18.0 on a Win7 PC.

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    A possible cause is that the server sends a wrong response header.
    The server may not comply to RFC 5987 and sends a wrong Content-Disposition:attachment; filename header.
    * https://developer.mozilla.org/en/Firefox_8_for_developers#Network

  • I want to display a first word in the data of a column

    i want to display the first word
    example: Software Engg Ooo
    answer should be Software
    using simple query no nested queries

    10g:
    SQL> select regexp_substr('Software Engg Ooo','[^ ]+') from dual;
    REGEXP_S
    Software                                                                                                                                                                                                                           

  • First word in text block doesn't display in correct font when viewed by FF

    I'm using a template and changed the font from the original. After publishing all the text appears in the correct font when viewed by Safari. When viewed by Firefox or IE the first and sometimes the last word displays in the original font? I've done 40+ pages with the same effect?

    Hmmm - not a perfect solution but for some reason this issue is resolved by a space before the first word and after the last word. Weird

  • When I type the first word's letters are always mixed up

    using an Apple  extended USB keyboard that came with my mac pro (2x 3ghz Dual Core Xeon processor, 18gb 667MHz RAM)
    It's like the Mac cant react fast enough to catch the first one or two letters and it just inserts them into the middle of the first word.
    like "Hello" would be "ellHo" and "OK" is "KO"
    the rest of the sentence is fine. or the rest of the paragraph, it seems to inly happen when I first select a text field or when I have been idle for mor ethan 30 seconds.  this happens in all apps. Mail, Firefox, Textedit etc.
    i have not yet unplugged the rest of my USB peripherals but that is my next step.
    Ihave a ADF scanner, multifuncion printer, logitech wireless mouse, usb plantronics headset, iMo 7" USB monitor. running os 10.7.2
    just upgraded and everything was fine in 10.6.x.
    anyone else experience this?
    thanks
    Steve

    I have similar problems with an Apple Wireless Keyboard (Bluetooth) and a MacBook Pro since installing Lion  I am running 10.7.2 also.   See https://discussions.apple.com/message/16701228#16701228 for more detail.  I think it's a bug in Lion.

  • Read the first word of each line in a text file

    i need to read the first word of each line of a text file.
    i know of line.split() but not actually sure how i would go about using it
    Any help most appreciated
    Many Thanks
    Ben

    Hi thanks for the reply!
    this is what i tried... and it still doesn't get me the first word of each line!
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.Color;
    import java.awt.event.ActionEvent;
    import java.io.*;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import javax.swing.text.*;
    import javax.swing.event.*;
    import java.util.Calendar;
    import java.util.Scanner;
    import java.util.Vector;
    import java.text.SimpleDateFormat;
    import java.net.InetAddress;
    import java.net.UnknownHostException;
    import java.io.BufferedReader;
    public class testing {
         Vector progs=new Vector();
         Vector rand=new Vector();
         String[] tmp = new String [2];
         String str;
         String str2="ewerwer";
         String str3;
         public void programTest()
                   try
                             BufferedReader in = new BufferedReader(new FileReader("progList.log"));
                             while ((str = in.readLine()) != null)
                                  progs.add(str);
                        catch(IOException e)
                             System.out.println("cannot read file");
         //////THE ISSUES IS HERE....I WANT TO GET THE FIRST WORD FROM EACH LINE OF THE FILE!!!     
              try
                             BufferedReader in2 = new BufferedReader(new FileReader("eventLog.log"));
                             while ((str = in2.readLine()) != null)
                                  tmp = str.split(" ");
                                  System.out.println(tmp[0]);
                        catch(IOException e)
                             System.out.println("cannot read file");
    public static void main(String[] args)
                 testing B = new testing();
                 B.programTest();
               //  B.fileToVector();
                 //B.LoginWindow();
               //B.anomDetect();
    }//end class

  • The system doesn't recognize or capitalize the word (I) or the first word of every sentence. Another really annoying thing about the integrated mail on your Mac computers is the fact that the system learns the word as you type it more and more instead of

    The system doesn’t recognize or capitalize the word (I) or the first word of every sentence. Another really annoying thing about the integrated mail on your Mac computers is the fact that the system learns the word as you type it more and more instead of highlighting it as incorrectly is this is a word that’s being misspelled. Can Apple fix this bug to make it user friendly as if you were using Office or a Word Document?

    You hit the target CT.
    It’s only fair that if Apple is going to integrate Mail into Mac PCs, it would be nice if the system does it for you like Office or perhaps Outlook. I just don’t to use Outlook although I have it installed and ready to use, but instead use Mail which comes with Mac OS already.
    I hope to make some sense here.

Maybe you are looking for

  • Would welcome suggestions for "best" substitute for .Mac w/ iWeb

    I currently use my .Mac and iDisk for publishing from iWeb, a link from my web site to all of my photo galleries, and a few files stored on iDisk.  Total amount of space is less than 10 GB.  The only service I have ever used for these functions is .M

  • TS4147 How do I resolve duplicates resulting from contacts created from different accounts?

    I have duplicate contacts in my address book. I discovered by merging that the duplicate contacts were created from different accounts. How do I ID the account the contact was created from? Note: the duplicates are in my address book only. I do not h

  • New object in the query

    Hi All, I need additional info object-Aging in the query which is not present in the query at the moment. This has to be feeded from the calculation below. Current date minus requested delivery date.So today is 28th November and lets say that the req

  • Detect substring in string

    Hi all, I am new to ABAP and hoping you guys can let me know if there is a better way to check for a substring in a string. I need to detect a substring (or should call it a word) 'CNF' in a string, and it need to be a word itself and not part of ano

  • Can you save your playlists??

    I need to delete Itunes from my computer and reinstall.  Will I loose all my playlists or since they are on my ipod it will sync it when I reinstall. Do I need to save anything before deleting to simplify the new install?? Also, Do you know the steps