Limit characters

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
 
P

Patrick Simonds

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.
 
B

Bob Phillips

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top