+ Reply to Thread
Results 1 to 4 of 4

Macro to select cell with smallest value in table, fill with light blue background.

  1. #1
    Registered User
    Join Date
    04-17-2014
    Location
    NJ
    MS-Off Ver
    Excel 2007
    Posts
    9

    Macro to select cell with smallest value in table, fill with light blue background.

    I've got a nice little softball question for you Masters of Excel. I'm trying to create a macro that selects the cell with the smallest positive integer from a table (A1:L16), and fills the background of that cell with a light blue color. The goal is to then manually replace that value with text, and rerun the macro to then find the next smallest positive integer in the table. This seems to be a simple task but I have little VBA experience and can really only manipulate code that I can record first. This does not qualify in that regard (except for the background fill part.) Although, I do feel like I'm overlooking a simple solution.

    Any help would be appreciated!

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,882

    Re: Macro to select cell with smallest value in table, fill with light blue background.

    Found this code at:

    http://www.globaliconnect.com/excel/...=79&Itemid=475

    You will have to change up the range and color scheme to meet your needs.

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    04-17-2014
    Location
    NJ
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Macro to select cell with smallest value in table, fill with light blue background.

    This looks intuitively more complex than it needs to be but I'll see if I can find my solution in there. Thanks!

  4. #4
    Registered User
    Join Date
    04-17-2014
    Location
    NJ
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Macro to select cell with smallest value in table, fill with light blue background.

    It did work! I did not think it would be so complex. Thanks again!

+ 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] Excel Macro that finds red text and fills same row with light blue
    By sierradk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-28-2014, 01:47 PM
  2. Charts traffic light background
    By Clash in forum Excel General
    Replies: 2
    Last Post: 12-08-2011, 09:14 AM
  3. blue background issue
    By lanerios in forum Excel General
    Replies: 7
    Last Post: 12-22-2009, 07:28 AM
  4. Getting rid of light blue lines
    By Jodie25 in forum Excel General
    Replies: 3
    Last Post: 06-04-2009, 01:45 PM
  5. Macro to Change Cell Background Color From White to No Fill
    By emcdemc in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-06-2009, 08:55 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