Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Jan Buckley
 
Posts: n/a
Default fill or truncate to a certain number of characters in a cell

I need to convert cells containing text to exactly 12 characters either by
truncating or filling with spaces. Does anyone know a formula that will do
that? Thanks.

Jan Buckley
  #2   Report Post  
JulieD
 
Posts: n/a
Default

Hi Jan

with your data in cell A2

=IF(LEN(A2)12,LEFT(A2,12),A2 & REPT(" ",12-LEN(A2)))

Cheers
JulieD

"Jan Buckley" wrote in message
...
I need to convert cells containing text to exactly 12 characters either by
truncating or filling with spaces. Does anyone know a formula that will do
that? Thanks.

Jan Buckley



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you count number of characters in a single cell Joe Excel Worksheet Functions 1 February 18th 05 09:08 PM
limit number of characters in a cell abfabrob Excel Discussion (Misc queries) 9 February 11th 05 04:19 PM
how do i filter data by number of characters in excel? monkeytrader Excel Discussion (Misc queries) 2 February 7th 05 05:38 PM
How do I increment a fill series by a number other than 1? Say I. John Excel Worksheet Functions 3 January 6th 05 09:34 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 01:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"