ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   always need 32 characters (https://www.excelbanter.com/excel-programming/367014-always-need-32-characters.html)

ringnab[_2_]

always need 32 characters
 

I need to copy cell entries into another program that then puts a
perspective resize on the text. In order for the perspective to work
properly, the content has to be exactly 32 characters in length so I
need something that will figure out the current number of characters in
the cell but then add the appropriate number of blank spaces.
Thanks in advance.
John


--
ringnab
------------------------------------------------------------------------
ringnab's Profile: http://www.excelforum.com/member.php...o&userid=35876
View this thread: http://www.excelforum.com/showthread...hreadid=560825


Charlie

always need 32 characters
 
StringOf32 = Left(OrigString & Space(32), 32)

"ringnab" wrote:


I need to copy cell entries into another program that then puts a
perspective resize on the text. In order for the perspective to work
properly, the content has to be exactly 32 characters in length so I
need something that will figure out the current number of characters in
the cell but then add the appropriate number of blank spaces.
Thanks in advance.
John


--
ringnab
------------------------------------------------------------------------
ringnab's Profile: http://www.excelforum.com/member.php...o&userid=35876
View this thread: http://www.excelforum.com/showthread...hreadid=560825



Lamont

always need 32 characters
 
Private Sub DoPadTo32()
Dim sResult As String * 32
Dim cellCurr As Range
Set cellCurr = ActiveCell
cellCurr.Select
LSet sResult = cellCurr.Value

'Documentation From Excel VBA HELP follows
'LSet stringvar = string
'LSet varname1 = varname2
'The LSet statement syntax has these parts:
'Part Description
'stringvar Required. Name of string variable.
'tring Required. String expression to be left-aligned within stringvar.
'varname1 Required. Variable name of the user-defined type being copied
to.
'varname2 Required. Variable name of the user-defined type being copied
from.
End Sub
--
Lamont Phemister


"ringnab" wrote:


I need to copy cell entries into another program that then puts a
perspective resize on the text. In order for the perspective to work
properly, the content has to be exactly 32 characters in length so I
need something that will figure out the current number of characters in
the cell but then add the appropriate number of blank spaces.
Thanks in advance.
John


--
ringnab
------------------------------------------------------------------------
ringnab's Profile: http://www.excelforum.com/member.php...o&userid=35876
View this thread: http://www.excelforum.com/showthread...hreadid=560825



JMB

always need 32 characters
 
Was it necessary to multi-post???

"ringnab" wrote:


I need to copy cell entries into another program that then puts a
perspective resize on the text. In order for the perspective to work
properly, the content has to be exactly 32 characters in length so I
need something that will figure out the current number of characters in
the cell but then add the appropriate number of blank spaces.
Thanks in advance.
John


--
ringnab
------------------------------------------------------------------------
ringnab's Profile: http://www.excelforum.com/member.php...o&userid=35876
View this thread: http://www.excelforum.com/showthread...hreadid=560825




All times are GMT +1. The time now is 12:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com