Results 1 to 3 of 3
  1. #1
    C Muth is offline Novice
    Windows 10 Access 2007
    Join Date
    Jun 2019
    Posts
    13

    Extracting characters to the right of an equals sign from inconsistently formatted data -

    Hi, I am attempting to extract characters from the left and then separately from the right of an equals sign. The number of characters and positioning of spaces is inconsistent.

    Below is an example of 3 records of data

    1x44=44
    3x2=6
    4 x 5 = 20

    Below is the desired results

    Left Results
    1x44
    3x2
    4 x 5

    Right Result
    44
    6
    20

    The following is a simplified version of the formula which pulls the characters to the left



    ````Expr1: Trim(Left([Field1],(InStr(1,[Field1],"=")-1)))````

    Have not been able to figure out how to do the same for the characters to the right of the equals sign.

    Thanks!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,898
    Trim(Mid(Field1, InStr(Field1, "=")+1))
    Last edited by June7; 06-30-2019 at 04:01 PM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    C Muth is offline Novice
    Windows 10 Access 2007
    Join Date
    Jun 2019
    Posts
    13
    simple and works perfect, thank you!

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

Similar Threads

  1. I have an access database I need data formatted from.
    By William.Kalies in forum Programming
    Replies: 12
    Last Post: 10-16-2014, 01:35 PM
  2. Replies: 6
    Last Post: 10-18-2013, 07:30 AM
  3. Replies: 35
    Last Post: 09-19-2011, 10:13 AM
  4. Best way to import badly formatted data
    By mkallover in forum Import/Export Data
    Replies: 3
    Last Post: 09-16-2010, 01:59 PM
  5. Displaying data formatted
    By Zoroxeus in forum Forms
    Replies: 0
    Last Post: 03-14-2006, 09:45 PM

Tags for this Thread

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