Results 1 to 5 of 5
  1. #1
    benlogo is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2015
    Posts
    2

    extract multiple values from a cell to a separate table?

    Hello all,

    I have imported an Excel table with a column which has several values in one cell separated by "\". In my case names of institutions afiliated with a patent. Example of the format of a single cell: MASSACHUSETTS INSTITUTE OF TECHNOLOGY (US)\ RIVE TECHNOLOGY INC (US)

    In order to normalize the Access database I would like to extract the institutions to a separate table (institutions) and that the patent is related to both institutions.



    Can anyone help me? I am using Access 2007.

    Thanks in advance!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    this only works if EVERY cell in field1 has the \ in it.

    select
    left([field1],instr([field1],"\")-1) as LEFTNAME,
    mid([field1],instr([field1],"\")+1) as RIGHTNAME
    from table

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848

  4. #4
    benlogo is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2015
    Posts
    2
    thanks for the reply!
    unfortunately only the cells with more than one company have the \ in it, but nearly half the cells of the column (about 1500) have only one company in this field.
    Is there any way I can still do it?

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848
    The routine I showed will still work.
    You will need to adjust the code to get new incoming records, but the Split function will still work

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 01-07-2015, 06:46 PM
  2. Replies: 10
    Last Post: 11-25-2014, 06:35 PM
  3. Replies: 1
    Last Post: 05-24-2013, 02:44 AM
  4. Replies: 3
    Last Post: 12-16-2011, 02:37 PM
  5. Extract data at end of cell
    By madsc1 in forum Access
    Replies: 2
    Last Post: 03-21-2011, 04:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums