Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi, i need to extract the last 4 digit from a number.
ex: A B 0788198256 8256 But if the first number of extracted 4 is zero, i need it to be transformed into 1. ex: A B 0788190248 1248 Can this be done? Thanks! |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
Try this =IF(RIGHT(A1,4)+0<1000,RIGHT(A1,4)+1000,RIGHT(A1,4 )+0) Mike "puiuluipui" wrote: Hi, i need to extract the last 4 digit from a number. ex: A B 0788198256 8256 But if the first number of extracted 4 is zero, i need it to be transformed into 1. ex: A B 0788190248 1248 Can this be done? Thanks! |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
=VALUE(IF(LEFT(RIGHT(A1,4),1)="0","1"&RIGHT(A1,3), RIGHT(A1,4)))
If this post helps click Yes --------------- Jacob Skaria "puiuluipui" wrote: Hi, i need to extract the last 4 digit from a number. ex: A B 0788198256 8256 But if the first number of extracted 4 is zero, i need it to be transformed into 1. ex: A B 0788190248 1248 Can this be done? Thanks! |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
With A1 containing numeric text of at least 4 characters:
This formula returns the 4 right-most chars, converting a leading zero to 1: B1: =MAX(LEFT(RIGHT(A1,4)),1)&RIGHT(A1,3) Examples: 0788198256.....8256 0788190256.....1256 Note: The returned values will be text. If you need numbers returned, try this variation: B1: =--(MAX(LEFT(RIGHT(A1,4)),1)&RIGHT(A1,3)) Is that something you can work with? Regards, Ron Coderre Microsoft MVP (Excel) "puiuluipui" wrote in message ... Hi, i need to extract the last 4 digit from a number. ex: A B 0788198256 8256 But if the first number of extracted 4 is zero, i need it to be transformed into 1. ex: A B 0788190248 1248 Can this be done? Thanks! |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
It's working very well. Thanks!
"Mike H" a scris: Hi, Try this =IF(RIGHT(A1,4)+0<1000,RIGHT(A1,4)+1000,RIGHT(A1,4 )+0) Mike "puiuluipui" wrote: Hi, i need to extract the last 4 digit from a number. ex: A B 0788198256 8256 But if the first number of extracted 4 is zero, i need it to be transformed into 1. ex: A B 0788190248 1248 Can this be done? Thanks! |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
It's working very well. Thanks!
"Jacob Skaria" a scris: =VALUE(IF(LEFT(RIGHT(A1,4),1)="0","1"&RIGHT(A1,3), RIGHT(A1,4))) If this post helps click Yes --------------- Jacob Skaria "puiuluipui" wrote: Hi, i need to extract the last 4 digit from a number. ex: A B 0788198256 8256 But if the first number of extracted 4 is zero, i need it to be transformed into 1. ex: A B 0788190248 1248 Can this be done? Thanks! |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
It's working very well. Thanks!
"Ron Coderre" a scris: With A1 containing numeric text of at least 4 characters: This formula returns the 4 right-most chars, converting a leading zero to 1: B1: =MAX(LEFT(RIGHT(A1,4)),1)&RIGHT(A1,3) Examples: 0788198256.....8256 0788190256.....1256 Note: The returned values will be text. If you need numbers returned, try this variation: B1: =--(MAX(LEFT(RIGHT(A1,4)),1)&RIGHT(A1,3)) Is that something you can work with? Regards, Ron Coderre Microsoft MVP (Excel) "puiuluipui" wrote in message ... Hi, i need to extract the last 4 digit from a number. ex: A B 0788198256 8256 But if the first number of extracted 4 is zero, i need it to be transformed into 1. ex: A B 0788190248 1248 Can this be done? Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
conditional format on first & last digit on 3 digit cell data | New Users to Excel | |||
Convert 2 digit month to 4 digit years and months | Excel Worksheet Functions | |||
Color a single digit in a mult-digit number cell | Excel Discussion (Misc queries) | |||
Tell users how to sort 5 digit and 9 digit zipcodes correctly aft. | New Users to Excel | |||
When we enter a 16 digit number (credit card) the last digit chan. | Excel Discussion (Misc queries) |