+ Reply to Thread
Results 1 to 2 of 2

changing colour of selected cell

  1. #1
    Registered User
    Join Date
    05-15-2008
    Posts
    3

    changing colour of selected cell

    Hi

    I have two 3x3 tables in excel. I want to write some vba code such that if a cell is selected in either of the tables that cell changes colour.

    I also want to make sure that at any one time at most one cell can be highlighted in each table.

    I don't know whether this is possible, but any help would be much appreciated.

    Thanks, Sam

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    2 versions of macro

    You can only install 1 of them on the same sheet module

    'These instructions pre typed & are worded to cater for the novice programmer
    'To install macro to correct location

    'Copy this macro
    'GoTo Excel
    'Select sheet this is to appy to
    'Right Click on Sheet Name Tab > select View Code
    'Past macro into the Worksheet Module displayed


    This version will colour 1 cell only


    Please Login or Register  to view this content.
    This version will colour 1 cell within each table using a different colour for each table
    Please Login or Register  to view this content.
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

+ 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