ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   cells of varied length extract last 3 digits (https://www.excelbanter.com/excel-discussion-misc-queries/249532-cells-varied-length-extract-last-3-digits.html)

PeggyT

cells of varied length extract last 3 digits
 
each cell in a column ends with "Program ###". I would like to create a
column with just the ###. Where ### represents varied digits.
Thanks
Peggy

Ms-Exl-Learner

cells of varied length extract last 3 digits
 
Use the formula for retreiving the last three characters / digits from a
particular cell.

For Retrieving Last Three Text Characters from a cell
=TRIM(RIGHT(A1,3))

For Retrieving Last Three Numeric Values from a cell
=--TRIM(RIGHT(A1,3))

Change the cell reference to your desired cell, if required.

If this post helps, Click Yes!

--------------------
(Ms-Exl-Learner)
--------------------



"PeggyT" wrote:

each cell in a column ends with "Program ###". I would like to create a
column with just the ###. Where ### represents varied digits.
Thanks
Peggy


T. Valko

cells of varied length extract last 3 digits
 
For Retrieving Last Three Numeric Values from a cell
=--TRIM(RIGHT(A1,3))


A1 = text program 001

Your formulas return 1.

If you want the number extracted as a numeric number and to retain the 3
digit format then you'll have to use a custom number format like 000 to
display the leading 0s. Note that when doing this the leading 0s are for
display purposes only. The true value of the cell will be numeric 1.

--
Biff
Microsoft Excel MVP


"Ms-Exl-Learner" wrote in message
...
Use the formula for retreiving the last three characters / digits from a
particular cell.

For Retrieving Last Three Text Characters from a cell
=TRIM(RIGHT(A1,3))

For Retrieving Last Three Numeric Values from a cell
=--TRIM(RIGHT(A1,3))

Change the cell reference to your desired cell, if required.

If this post helps, Click Yes!

--------------------
(Ms-Exl-Learner)
--------------------



"PeggyT" wrote:

each cell in a column ends with "Program ###". I would like to create a
column with just the ###. Where ### represents varied digits.
Thanks
Peggy





All times are GMT +1. The time now is 10:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com