Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default 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 ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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 ***



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default 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 ***
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change Cell Width WITHOUT changing Column width dww701 Excel Discussion (Misc queries) 1 January 12th 09 10:52 PM
how do I create multiple column width in the same column in excel Vish Excel Discussion (Misc queries) 9 November 3rd 06 11:49 PM
How to make cell width different than the column width it lies in John Excel Discussion (Misc queries) 2 September 11th 06 10:41 PM
Change the width of a single column in a column chart Dave Charts and Charting in Excel 2 December 13th 04 07:25 PM


All times are GMT +1. The time now is 04:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"