+ Reply to Thread
Results 1 to 3 of 3

Multiple If statements. OVER 64k!

  1. #1
    Forum Contributor
    Join Date
    01-07-2004
    Posts
    192

    Multiple If statements. OVER 64k!

    I am sure there is an easier way of doing this than the way I am but without skills.... What I am doing is checking dates to see if they are more than 7, 30 days or less than 7 days away. Depending on the number of days out the cell will change its background color and/or font color. I know little of Excel so don’t laugh at my code ok?
    As my title says, it’s over 64K which threw an error from excel saying "procedure to large". Reading the help file it said a procedure can not be more than 64K when compiled. Anyway, this is what I have except multiplied 50 times to cover 50 cells. If anyone knows an easier way I would love to hear about it

    Before this got too large it was working. I also had this copied into the Thisworkbook using the Private Sub Workbook_Open() so it would make the changes as soon as I opened the workbook.


    I know its sloppy but here is what I have...

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    01-11-2004
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    388
    Hi!

    I haven't spent much time looking at the code. What did catch my eye was your objective.

    Check me: you want certain cells to change colour if one of three criteria is met?

    If that is the case, look at conditional formatting in the Format menu item.

    Alf

  3. #3
    Forum Contributor
    Join Date
    01-07-2004
    Posts
    192
    Yes but conditional fomatting only allows for 3 conditions. I know about the excel add-in that will allow more but I do not want to use that. I tried using that and then tried to open it on another comupter. It wanted me to install the add-in on that computer.
    I need about 5 or maybe more conditions for what I want to do here.

    Quote Originally Posted by AlfD
    Hi!

    I haven't spent much time looking at the code. What did catch my eye was your objective.

    Check me: you want certain cells to change colour if one of three criteria is met?

    If that is the case, look at conditional formatting in the Format menu item.

    Alf

+ 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