+ Reply to Thread
Results 1 to 3 of 3

Length / IF formula or formatting?

  1. #1
    Registered User
    Join Date
    05-13-2022
    Location
    Milwaukee
    MS-Off Ver
    Excel
    Posts
    1

    Length / IF formula or formatting?

    I use a scanner to enter DHL, FedEx, & UPS tracking numbers into a spread sheet, and unfortunately the scanner can not be reprogrammed. The scanner picks up DHL and UPS perfectly but FedEx scans an additional 22 numbers to the tracking. To clean it up I use the =Right(A1,LEN(A1)-22) formula, which works great.

    Examples:
    DHL:5525356833
    UPS:1ZW1E4770329477584
    FedEx: 1001901781540005309200762204514878

    All shipments have a very similar number patterns.

    I want to scan the tracking numbers from all 3 examples into the A column and get my intended tracking numbers in the B column. DHL and UPS data would stay the same and I would need to use the formula mentioned above to get the intended outcome for the FedEx trackings.

    Is there a formula or certain conditional formatting that will work for what I am trying to accomplish?

  2. #2
    Forum Expert dosydos's Avatar
    Join Date
    12-09-2015
    Location
    Massachusetts
    MS-Off Ver
    365(PC) V:2308
    Posts
    1,474

    Re: Length / IF formula or formatting?

    you could just throw an IFERROR() in the front of your formula:

    =IFERROR(RIGHT(A1,LEN(A1)-22),A1)
    <----- If you are happy with your solution please click on the "* Add Reputation" as a way to say thank you.

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,808

    Re: Length / IF formula or formatting?

    how many characters in total on the FedEx info
    you could use LEN()
    if it adds
    an additional 22 numbers
    in B1
    =IF( Len(A1)>22 , Right(A1,LEN(A1)-22) , A1 )
    and copy down
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

+ 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. Conditional formatting for character length
    By gstein in forum Excel General
    Replies: 9
    Last Post: 03-13-2023, 02:08 PM
  2. Conditional Formatting Formula based on length of expired date
    By HSawyer4288 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-20-2021, 11:15 PM
  3. Cell length formula to remove any characters over 31 in length
    By tehkayd in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-02-2015, 11:45 AM
  4. [SOLVED] Finding a formula that will consider length of cell and length of words
    By Mariah B in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-07-2013, 05:39 PM
  5. [SOLVED] Formatting Width and Length of Shapes
    By Heva in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-15-2013, 11:53 AM
  6. Conditional Formatting Character length
    By JohnB in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-20-2006, 06:55 PM
  7. Formatting Data Columns of various length with Macros
    By wfc in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-31-2005, 07:05 AM

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