Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default Coloring a datafield when nr of characters is more then 40

Hello,

Can somebody please provide me with a loop function which will color
the datafield in a red color if the number of characters is more then
40.
This function is needed to loop only through the first column of the
sheet from record 2 till last.

Hopely you can help me out.

regards,
Johan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Coloring a datafield when nr of characters is more then 40

You may want to use Format|Conditional formatting (in xl2003 menus).

Select the range (A2:A999)
format|conditional formatting
formula is:
=len(a2)40

and give it a nice format.

wrote:

Hello,

Can somebody please provide me with a loop function which will color
the datafield in a red color if the number of characters is more then
40.
This function is needed to loop only through the first column of the
sheet from record 2 till last.

Hopely you can help me out.

regards,
Johan


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default Coloring a datafield when nr of characters is more then 40

Why don't you use conditional formatting? Select range, say, from A2 to last
row, FormatConditional formattingChoose formula as condition and enter
=LEN(A2)40
in the formula field and choose red pattern!


Regards,
Stefi

ezt *rta:

Hello,

Can somebody please provide me with a loop function which will color
the datafield in a red color if the number of characters is more then
40.
This function is needed to loop only through the first column of the
sheet from record 2 till last.

Hopely you can help me out.

regards,
Johan

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default Coloring a datafield when nr of characters is more then 40

Thanks all.
Very simple and works fine.

regrds,
Johan

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default Coloring a datafield when nr of characters is more then 40

You are welcome! Thanks for the feedback!
Clicking the YES button will be appreciated.
Stefi

ezt *rta:

Thanks all.
Very simple and works fine.

regrds,
Johan


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
Show and Hide in Datafield Fullam Excel Discussion (Misc queries) 0 April 17th 06 12:26 PM
Toggle datafield in Pivottable Tetsuya Oguma[_4_] Excel Programming 1 September 30th 04 07:03 AM
Datareport - Datafield not found Cady Steldyn Excel Programming 0 September 12th 04 05:14 AM
Finding Matching Pivot Datafield Todd Huttenstine Excel Programming 5 April 26th 04 09:26 PM
Macro to find last datafield Patrick[_6_] Excel Programming 2 November 30th 03 10:06 PM


All times are GMT +1. The time now is 06:54 AM.

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"