Column Cell character number checking

T

tlee

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
 
P

Patrick Molloy

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
 
T

tlee

Hi Patrick,

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

Thanks again

TLee
 
P

Patrick Molloy

shucks, blush

thank you

tlee said:
Hi Patrick,

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

Thanks again

TLee
 

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