Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I'm working on a spreadsheet and the first column is numbers that are Police
Case Files. These numbers should be year and 4 digit number (08-0585). The numbers (text) after the date 08 have been entered incorrectly without the - 0. Is there a formula I could use to change all the case files to add the -0. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
hi
try this.... =LEFT(B2,2)&"-"&RIGHT(B2,4) coverts 080585(your example) to 08-0585 adjust cell reference to fit your data. regards FSt1 "JWR55" wrote: I'm working on a spreadsheet and the first column is numbers that are Police Case Files. These numbers should be year and 4 digit number (08-0585). The numbers (text) after the date 08 have been entered incorrectly without the - 0. Is there a formula I could use to change all the case files to add the -0. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Feb 21, 1:46*pm, FSt1 wrote:
hi try this.... =LEFT(B2,2)&"-"&RIGHT(B2,4) coverts 080585(your example) to 08-0585 adjust cell reference to fit your data. regards FSt1 "JWR55" wrote: I'm working on a spreadsheet and the first column is numbers that are Police Case Files. These numbers should be year and 4 digit number (08-0585). *The numbers (text) after the date 08 have been entered incorrectly without the - 0. *Is there a formula I could use to change all the case files to add the -0.- Hide quoted text - - Show quoted text - Was thinking this might better answer the question: =LEFT(A2,2)&"-0"&RIGHT(A2,3) |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If only some entries are incorrect, you could use a combination of what has
been suggested: =IF(LEN(A1)=6,LEFT(A1,3)&"0"&RIGHT(A1,3),A1) Apparently I need practice explaining formulas, let me know how I do: If the string length of cell A1 is only 6 (eg 08-885) instead of 7 (eg 08-0885) then combine the left 3 characters of A1 (eg 08-) with a 0 and the right 3 characters (eg 885), otherwise copy cell A1 (eg if it has all 7 characters, just copy it as is) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|