Set Column width

T

Tempy

Good day,

I am recieving a spreedsheet that is set up programmatically in Germany
and the columns are set to certain widths and this is causing problems
when doing a count for names in the column. The column is set to 30
characters and Text; if i have the name "Nel" with a look up it does not
see it as i do not have the spaces ?

If i use the name "Nel" & "27 spaces" then it finds it ?

Could i please have some advise on how to rectify this as i have names
varying in lenght.

Thanks

Tempy

*** Sent via Developersdex http://www.developersdex.com ***
 
B

Bob Phillips

Hi Tempy,

You could trim them all

For Each cell In ActiveSheet.UsedRange
If Not cell.HasFormula Then
cell.Value = Trim(cell.Value)
End If
Next cell


--

HTH

RP
(remove nothere from the email address 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