![]() |
Set Column width
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 *** |
Set Column width
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) "Tempy" wrote in message ... 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 *** |
Set Column width
Thanks Bob,
Works great, i only did the required columns though as the spreedsheet is too big. Tempy *** Sent via Developersdex http://www.developersdex.com *** |
All times are GMT +1. The time now is 07:24 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com