+ Reply to Thread
Results 1 to 2 of 2

Search range of cells for specific values / automated colour updates

  1. #1
    Registered User
    Join Date
    10-26-2013
    Location
    London, England
    MS-Off Ver
    Excel 2000
    Posts
    4

    Search range of cells for specific values / automated colour updates

    Hi folks

    I have two issues with my spreadsheet so to start i'll explain what I want to happen.

    I have a workbook which records what type of work i'm doing and changes the appropriate rows to a certain colour depending on what type of work i'm entering onto the spreadsheet (i've asked about that here before, that works fine).

    I have attached a copy of the spreadsheet, but on the left hand side is the log of what work i'm doing, and on the right is an automated log of my performance against targets. There are several types of work; assessments, tasks etc. Each type has a colour and when you press the appropriate letter in the Type field (a for assessments, for example), the whole corresponding row turns green, as you will see on the spreadsheet.

    What I want to happen is to be able to change the colours of the box on the right, for example changing the green assessments box to yellow, and for that colour to update any entried already entered onto the spreadsheet. All I've been able to manage so far is to get it working so that if I change the colour of, let's say the green assessments box on the right, all future assessments entered on the left will update with the new colour, but the already entered ones will stay green.

    So far I have the following code to update the cells as I want to:

    Please Login or Register  to view this content.
    Please note that the variable 'assessmentnumber' is mentioned earlier in the code and points to Cell G6, which contains the colour code of the assessment colour box, in this case green.

    The code above is located in the Worksheet_change sub and currently alters the colour of the first assessment recorded (in E5) once I've changed the colour in the assessment colour box (H6) and then clicking on a different cell.

    In theory I could just repeat the code above for every cell from H5 to H100 and for each letter (a, e, i, o, t and s are all used) but there's surely an easier way than this. In essence I need a way to search every cell in the range E5 to E100 for what (if any) letter is in the E column and then change the colour of the relevant row depending on what colour is in the corresponding H column.

    Another issue which is linked to this is that I want the change to be automatic and not rely on me switching to a different cell before the change takes effect. You will see on the spreadsheet code that the G cells record the colours of the appropriate H cells, and that this is performed through the selection_change sub. I have attempted to just move this code to the calculate sub, however the code generates stack errors and often just crashes excel.

    I hope someone can help me with this, I realise I may not have explained myself very well so let me know if you want me to provide more detail.

    workV2colourtest.xls
    Last edited by Leith Ross; 01-10-2014 at 05:19 PM.

  2. #2
    Registered User
    Join Date
    10-26-2013
    Location
    London, England
    MS-Off Ver
    Excel 2000
    Posts
    4

    Re: Search range of cells for specific values / automated colour updates

    Any thoughts about my issue folks?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Search values and copy to specific sheet & cells
    By keis386 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-19-2013, 12:24 PM
  2. Replies: 2
    Last Post: 04-05-2012, 08:22 AM
  3. Search and mark specific values in cells
    By RollWeb in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-16-2009, 06:09 PM
  4. Getting range of cells with specific text colour, then using in a COUNTIF formulae
    By cheekyflash in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-11-2006, 08:58 PM
  5. Replies: 1
    Last Post: 05-16-2006, 05:20 AM

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