Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Limit characters
I use the code below to populate column A. Is there any way to change the
code to limit it to the first 15 characters from the left? Me.Range("A2:A301").Value = Me.Range("B2:B301").Value |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Limit characters
Try this:
Me.Range("A2:A301")= Left(Me.Range("B2:B301").Value,15) "Patrick Simonds" wrote: I use the code below to populate column A. Is there any way to change the code to limit it to the first 15 characters from the left? Me.Range("A2:A301").Value = Me.Range("B2:B301").Value |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Limit characters
Does not seem to work.
The range B2:B301 contains the following code: =IF(C65="zxz","",IF(COUNTIF(C65:D65,""""),IF($R$1 =1,TEXT(C65,"") &" "&TEXT(D65,""),TEXT(D65,"") &", "&TEXT(C65,"")),"")) This combines text from Columns D (Last Name) with Column C (First Name) and places a , between them. But when I run the code: Me.Range("A2:A301")= Left(Me.Range("B2:B301").Value,15) Nothing happens. "JLGWhiz" wrote in message ... Try this: Me.Range("A2:A301")= Left(Me.Range("B2:B301").Value,15) "Patrick Simonds" wrote: I use the code below to populate column A. Is there any way to change the code to limit it to the first 15 characters from the left? Me.Range("A2:A301").Value = Me.Range("B2:B301").Value |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Limit characters
For Each cell In Me.Range("A2:A301")
cell.Value = Left(cell.Value, 15) Next cell -- --- HTH Bob (change the xxxx to gmail if mailing direct) "Patrick Simonds" wrote in message ... I use the code below to populate column A. Is there any way to change the code to limit it to the first 15 characters from the left? Me.Range("A2:A301").Value = Me.Range("B2:B301").Value |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Limit to 5 characters... | Excel Worksheet Functions | |||
How to limit the characters in a cell | Excel Worksheet Functions | |||
How do I limit characters in a cell? | Excel Worksheet Functions | |||
limit of characters in Excell | Excel Discussion (Misc queries) | |||
SQL limit of 255 characters | Excel Programming |