Announcement

Collapse
No announcement yet.

Remove four digits from the right

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    Re: Remove four digits from the right

    Try this.

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

    Comment


    • #3
      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, 01: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.

      Comment


      • #4
        Re: Remove four digits from the right

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


        - - -Scott

        Comment

        Working...
        X