+ Reply to Thread
Results 1 to 4 of 4

Conditional Formatting & Character Count Comparison Macro

  1. #1
    Registered User
    Join Date
    01-10-2008
    Posts
    44

    Conditional Formatting & Character Count Comparison Macro

    First of all, I would like to thank everyone for all your help. I have included an attachment to illustrate what I hope will be a clear explanation. Here we go...

    In Column B (Character Count), I will need to enter the maximum number of characters for the cells that follow (Col. C, E, G, I, K). Col. C will have text entered in them (This is the same for Col. E, G, I, & K). Col. D will need to have the character count of the adjacent Col C. (This will also be the case for Col. F which will be character count of Col E; Col H for Col G; Col J for Col I; Col L for Col K). The count number in Col D. should only show up once text is entered in Col. C

    If the character count quantity in Col D (or Col. F, H, J, L) is greater than the number entered in Col B, then Col. D cell should remain red, while the text in Col C should turn to red text. Once the text is edited in Col. C to be within the Col B count limit, the text should turn black and Col. C cell should turn clear.

    I am working with the code below and I need to fit all this fun somewhere in this code.


    Please Login or Register  to view this content.

    Thank you everyone. Props to Bob for helping me out initially with the above code.
    Attached Files Attached Files
    Last edited by BluTalon; 11-04-2008 at 04:13 AM.

  2. #2
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Conditional formatting

    Hi

    Perhaps it is not necessary to use VBA, e.g. in your example if in cell D9 you use Len(C9) to determine the number of characters, and then correspondingly in the other columns it is possible to use conditional formatting based on if F9 (H9 etc.) was greater than D9, to change font and cell background color.

    Regards

    Jeff

  3. #3
    Registered User
    Join Date
    01-10-2008
    Posts
    44
    I tried using conditional formatting for that, but I must be doing something wrong, then.

    I set Condition 1 as Formula is =$D:$D>$B:$B. Basically, the entire column has to do the character count and all of column c has to have that condition. When I tried this, nothing happened in the cells.

    I thought there might be a way that vba code could be inserted into what I already have above to do to account for the character count. Any ideas?
    Last edited by BluTalon; 11-05-2008 at 02:58 AM.

  4. #4
    Registered User
    Join Date
    01-10-2008
    Posts
    44
    Bump - No Response

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1