PC Review


Reply
Thread Tools Rate Thread

Column Cell character number checking

 
 
tlee
Guest
Posts: n/a
 
      19th May 2009
Hi all,

How can I check the number of the characters at the specified column of
whole cells? (by using Macro)

e.g.
1) Prompt the message box to select range of columns to check.

2) input the several columns would be check

3) Macro will check all the cells of the relative columns for example, the
number character (including "Spaces" and "symbols")

4) Highlight the excess number of characters cells or activate (let the user
tor re-change the content of the problem cell to below the limit of
character length)

Assume the cell character length is 20.

Thanks for your help.

TLee


 
Reply With Quote
 
 
 
 
Patrick Molloy
Guest
Posts: n/a
 
      19th May 2009
something simple ... this code assumes the area has been selected

dim cell as range
dim source as range
set source = Selection
for each cell in source
if LEN(cell.Value)>20 then
cell.interior.ColorIndex = XLRED
end if
next

"tlee" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi all,
>
> How can I check the number of the characters at the specified column of
> whole cells? (by using Macro)
>
> e.g.
> 1) Prompt the message box to select range of columns to check.
>
> 2) input the several columns would be check
>
> 3) Macro will check all the cells of the relative columns for example, the
> number character (including "Spaces" and "symbols")
>
> 4) Highlight the excess number of characters cells or activate (let the
> user tor re-change the content of the problem cell to below the limit of
> character length)
>
> Assume the cell character length is 20.
>
> Thanks for your help.
>
> TLee
>
>

 
Reply With Quote
 
tlee
Guest
Posts: n/a
 
      19th May 2009
Hi Patrick,

Thanks for your help, you are so powerful !!!
How you enrich the programming knowledge?

Thanks again

TLee


>
> dim cell as range
> dim source as range
> set source = Selection
> for each cell in source
> if LEN(cell.Value)>20 then
> cell.interior.ColorIndex = XLRED
> end if
> next
>
> "tlee" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Hi all,
>>
>> How can I check the number of the characters at the specified column of
>> whole cells? (by using Macro)
>>
>> e.g.
>> 1) Prompt the message box to select range of columns to check.
>>
>> 2) input the several columns would be check
>>
>> 3) Macro will check all the cells of the relative columns for example,
>> the number character (including "Spaces" and "symbols")
>>
>> 4) Highlight the excess number of characters cells or activate (let the
>> user tor re-change the content of the problem cell to below the limit of
>> character length)
>>
>> Assume the cell character length is 20.
>>
>> Thanks for your help.
>>
>> TLee
>>
>>

 
Reply With Quote
 
Patrick Molloy
Guest
Posts: n/a
 
      19th May 2009
shucks, blush

thank you

"tlee" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi Patrick,
>
> Thanks for your help, you are so powerful !!!
> How you enrich the programming knowledge?
>
> Thanks again
>
> TLee
>
>
>>
>> dim cell as range
>> dim source as range
>> set source = Selection
>> for each cell in source
>> if LEN(cell.Value)>20 then
>> cell.interior.ColorIndex = XLRED
>> end if
>> next
>>
>> "tlee" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> Hi all,
>>>
>>> How can I check the number of the characters at the specified column of
>>> whole cells? (by using Macro)
>>>
>>> e.g.
>>> 1) Prompt the message box to select range of columns to check.
>>>
>>> 2) input the several columns would be check
>>>
>>> 3) Macro will check all the cells of the relative columns for example,
>>> the number character (including "Spaces" and "symbols")
>>>
>>> 4) Highlight the excess number of characters cells or activate (let the
>>> user tor re-change the content of the problem cell to below the limit of
>>> character length)
>>>
>>> Assume the cell character length is 20.
>>>
>>> Thanks for your help.
>>>
>>> TLee
>>>
>>>

 
Reply With Quote
 
tlee
Guest
Posts: n/a
 
      19th May 2009
Hi Patrick,

You're so modest : )

TLee

> shucks, blush
>
> thank you
>
> "tlee" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Hi Patrick,
>>
>> Thanks for your help, you are so powerful !!!
>> How you enrich the programming knowledge?
>>
>> Thanks again
>>
>> TLee
>>
>>
>>>
>>> dim cell as range
>>> dim source as range
>>> set source = Selection
>>> for each cell in source
>>> if LEN(cell.Value)>20 then
>>> cell.interior.ColorIndex = XLRED
>>> end if
>>> next
>>>
>>> "tlee" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>> Hi all,
>>>>
>>>> How can I check the number of the characters at the specified column
>>>> of whole cells? (by using Macro)
>>>>
>>>> e.g.
>>>> 1) Prompt the message box to select range of columns to check.
>>>>
>>>> 2) input the several columns would be check
>>>>
>>>> 3) Macro will check all the cells of the relative columns for example,
>>>> the number character (including "Spaces" and "symbols")
>>>>
>>>> 4) Highlight the excess number of characters cells or activate (let the
>>>> user tor re-change the content of the problem cell to below the limit
>>>> of character length)
>>>>
>>>> Assume the cell character length is 20.
>>>>
>>>> Thanks for your help.
>>>>
>>>> TLee
>>>>
>>>>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
checking the content of a cell if it starts with certain character =?Utf-8?B?VGltdXI=?= Microsoft Excel Programming 2 1st Aug 2007 01:26 PM
Checking a cell's (Row,Column) Craig Microsoft Excel Programming 3 25th Dec 2005 01:47 PM
Checking cell for Number =?Utf-8?B?TGVl?= Microsoft Excel New Users 2 11th Oct 2005 09:23 PM
checking number of character in input box Mikey May Microsoft Excel Misc 1 10th Nov 2003 12:28 PM
checking a record for highest number in a column Brian Henry Microsoft ADO .NET 1 19th Sep 2003 07:47 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:37 AM.