Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Results 1 to 4 of 4

Thread: Remove four digits from the right

  1. #1
    Join Date
    9th July 2004
    Location
    Northern Shenandoah Valley, Virginia
    Posts
    94

    Remove four digits from the right

    Good morning,

    I have a list of item numbers that I need to remove the last four digits and leave the remainder to the left. I have a formula that will count over from the left three digits and show those three digits only, but there are times that all item numbers do not have the same amount of digits. What they do have in common is that it is always the digits before the last four digits
    For example

    331884
    4161895
    What I need is 33 and 416. Is there a formula that I can use that will remove the four digits on the right?

    I have attached a sample.

    Thank you for taking time to help. I appreciate it.

    - - -Scott
    Attached Files. REMINDER! OzGrid accepts no responsibility for ANY adverse effects as a result from downloading attached files. ALWAYS run an up-to-date virus scan and disable macros.

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    14th July 2004
    Posts
    10,539

    Re: Remove four digits from the right

    Try this.

    =LEFT(A4,LEN(A4)-4)

    Excel Video Tutorials / Excel Dashboards Reports


  3. #3
    Join Date
    22nd April 2003
    Location
    Virginia, USA
    Posts
    5,035

    Re: Remove four digits from the right

    norie's formula will provide the result in TEXT format. You can generally use the result in a formula (as a number) but will have problems if you do things like test to see if it is equal to another cell with a number in it (like in an IF statement). If this might be an issue for future use of the cell's content and you want a number (format) returned, use either:
    =VALUE(LEFT(A4,LEN(A4)-4))

    =--LEFT(A4,LEN(A4)-4)
    Last edited by thomach; February 14th, 2006 at 00:27. Reason: add formula variation
    Best Regards,
    Tom
    ---------------------------
    Please help Oz share knowledge among all users by posting your questions in a public forum rather than using a Private Message.

  4. #4
    Join Date
    9th July 2004
    Location
    Northern Shenandoah Valley, Virginia
    Posts
    94

    Re: Remove four digits from the right

    Thank you! That is exactly what I was looking for.


    - - -Scott

    Excel Video Tutorials / Excel Dashboards Reports


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Possible Answers

  1. Replace First X Digits
    By ProofReader96 in forum EXCEL HELP
    Replies: 12
    Last Post: December 14th, 2007, 13:51
  2. 24 Digits Mod Function
    By 281975 in forum EXCEL HELP
    Replies: 5
    Last Post: July 31st, 2007, 23:18
  3. 2 digits weeknumbers
    By Obelix in forum EXCEL HELP
    Replies: 11
    Last Post: March 16th, 2006, 21:16
  4. 16 digits numbers
    By ismail in forum EXCEL HELP
    Replies: 3
    Last Post: August 31st, 2005, 19:39
  5. Replies: 1
    Last Post: August 18th, 2003, 05:16

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
  •  
porno