Limit characters

  • Thread starter Thread starter Patrick Simonds
  • Start date Start date
P

Patrick Simonds

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
 
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.
 
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)
 
Back
Top