+ Reply to Thread
Results 1 to 2 of 2

How to use a Macro Apply Conditional Formatting to Column based on contents & color table

  1. #1
    Registered User
    Join Date
    04-17-2013
    Location
    Walla Walla, Washington
    MS-Off Ver
    Excel 2007
    Posts
    19

    How to use a Macro Apply Conditional Formatting to Column based on contents & color table

    I've been looking for an answer (or something close to one) to a question for quite some time now, and I have exhausted all of my resources.

    I have an Inventory Report Spreadsheet that currently imports an inventory report from our system, inputs it in this form, and calculates what needs to be ordered for us to keep stock through the given timeframe (i.e. based on a two week report, how much stock do we have to order to last through the NEXT two weeks). I have a table on my Config worksheet that contains a list of partial SKUs and each SKU is colored a different background color (this is a Named Range called SKUList). I also have a macro that processes the current inventory report, adds a few formulas to figure out what to order, and saves it into a new worksheet in this workbook. what I would like to accomplish is this:

    At the end of my Macro, I would like to conditionally format all of the first column (the SKU column, variable: rngSKU As Range) based on text found in the SKU list on my config page, and color the cells based on the color of each cell on the SKU list. So something like

    If text(SKUlist) Exists, then
    Set Cell Color = Corresponding SKUList Cell

    I don't necessarily need a whole Sub typed out, but I am looking for someone who might be able to explain how to do this. I am not a VBA newbie, but I am far from being proficient.

    **EDIT**

    This is my "formatting" code block:

    Please Login or Register  to view this content.
    Last edited by TimBZKK; 05-28-2014 at 06:32 PM.

  2. #2
    Registered User
    Join Date
    04-17-2013
    Location
    Walla Walla, Washington
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: How to use a Macro Apply Conditional Formatting to Column based on contents & color ta

    Also, I know I could make the macro select the first column and apply one conditional format after the other, but:

    1. I am still not sure how to grab color values for the background, and
    2. I would have one block of code that pulls the cell value AND cell color from SKUList, as we may bring in new item brands, and therefore have new SKUs, and I may not be the one managing the store when that happens. I am trying to make this as future-proof and user friendly as possible.

+ 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. Creating table with conditional formatting based on growing contents
    By Ash_ in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-13-2013, 11:45 AM
  2. VBA for Conditional Formatting - apply a colour based on conditions in each column.
    By acsishere in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-27-2013, 01:24 PM
  3. Replies: 5
    Last Post: 05-03-2012, 06:06 PM
  4. Macro to change font color based on contents of another column
    By Pat Parker in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-28-2010, 12:33 AM
  5. Replies: 6
    Last Post: 12-22-2008, 06:16 PM

Tags for this Thread

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