Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi all again
I need the address to be 18 characters long i.e. if the address is over 18 characters then chop it, if its under, then add spaces Is this possible? Thanks as always Derek |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=left(a1&rept(" ",18),18)
This will add spaced at the end if you want spaces in front =right(rept(" ",18)&a1,18) -- Wag more, bark less "Derek M" wrote: Hi all again I need the address to be 18 characters long i.e. if the address is over 18 characters then chop it, if its under, then add spaces Is this possible? Thanks as always Derek |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
that second formula would result in the last 18 characters of the address if
A1 was already longer than that. =left(rept(" ",max(0,18-len(a1)))&a1,18) "Brad" wrote in message ... =left(a1&rept(" ",18),18) This will add spaced at the end if you want spaces in front =right(rept(" ",18)&a1,18) -- Wag more, bark less "Derek M" wrote: Hi all again I need the address to be 18 characters long i.e. if the address is over 18 characters then chop it, if its under, then add spaces Is this possible? Thanks as always Derek |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Fantastic, thanks guys
"Steve Dunn" wrote: that second formula would result in the last 18 characters of the address if A1 was already longer than that. =left(rept(" ",max(0,18-len(a1)))&a1,18) "Brad" wrote in message ... =left(a1&rept(" ",18),18) This will add spaced at the end if you want spaces in front =right(rept(" ",18)&a1,18) -- Wag more, bark less "Derek M" wrote: Hi all again I need the address to be 18 characters long i.e. if the address is over 18 characters then chop it, if its under, then add spaces Is this possible? Thanks as always Derek |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Display only n numbers of characters for long text? | Excel Worksheet Functions | |||
Extracting certain characters from a long string | Excel Worksheet Functions | |||
Validation - Precede with LR and between 6 and 9 characters long. | Excel Discussion (Misc queries) | |||
How to enter a long address to new web query | Excel Discussion (Misc queries) | |||
long address list, name-address-city, listed vertically, how do y. | Excel Discussion (Misc queries) |