Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default Insert a fixed number of characters

Hi all,

Is there a function which can insert a fixed number of character. I want to
use this kind of function to do the alignment.

Clara
--
thank you so much for your help
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Insert a fixed number of characters

Clara - sounds like the repeat function would work for you. For example,

=REPT("A",7)

would return seven A's ("AAAAAAA"). Alternatively, you might also find the
Text function useful for aligning numbers:

=TEXT(1,"0000")

would return "0001".

Hope this helps.

-Cory

"clara" wrote:

Hi all,

Is there a function which can insert a fixed number of character. I want to
use this kind of function to do the alignment.

Clara
--
thank you so much for your help

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Insert a fixed number of characters

'Left-pad a string v with spaces, to a total length of i characters
Function lPad(v, i) As String
lPad = String(i - Len(v), " ") & v
End Function

Tim


"clara" wrote in message
...
Hi all,

Is there a function which can insert a fixed number of character. I want
to
use this kind of function to do the alignment.

Clara
--
thank you so much for your help



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Insert a fixed number of characters

I'm not sure what you're doing, but if you're trying to indent a value in a
cell, you may want to

select the range
format|cells|alignment tab
and increase the indent box

The underlying value doesn't change.


clara wrote:

Hi all,

Is there a function which can insert a fixed number of character. I want to
use this kind of function to do the alignment.

Clara
--
thank you so much for your help


--

Dave Peterson
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 I insert a decimal into a fixed number? Tom in Alaska Excel Discussion (Misc queries) 12 April 13th 10 11:48 PM
Insert Leading Characters If String Is Only 7 Characters Paperback Writer Excel Discussion (Misc queries) 2 April 21st 09 09:07 PM
How can i specify a cell to have a fixed number of characters john dunford Excel Discussion (Misc queries) 1 January 30th 06 10:08 PM
Rounding a number to a multiple quantity that adds to a fixed total number wjlo Excel Worksheet Functions 1 November 9th 04 04:43 PM
Insert data between 2 fixed rows Payal[_2_] Excel Programming 0 April 7th 04 06:30 PM


All times are GMT +1. The time now is 06:18 PM.

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

About Us

"It's about Microsoft Excel"