+ Reply to Thread
Results 1 to 3 of 3

[SOLVED] Vba to fill row below based on cell value above

  1. #1
    Forum Contributor
    Join Date
    04-05-2013
    Location
    CT
    MS-Off Ver
    Excel 2010
    Posts
    360

    [SOLVED] Vba to fill row below based on cell value above

    I'm looking for a code that automatically will gray out a defined row below a cell that contains specific text. Example:

    if column D contains "2P" the row below that cell from B to E is filled gray.

    D6 = 20A-2P
    cells B7:E7 are filled gray.

    I attached a sample spreadsheet too.
    Attached Files Attached Files
    Last edited by adamheon; 04-24-2016 at 08:45 PM.

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,588

    Re: Vba to fill row below based on cell value above

    Conditional Formatting?

    1) Select B6:E and rows that you want to appy
    2) Formula: =ISNUMBER(FIND("-2P",$D5))

  3. #3
    Forum Contributor
    Join Date
    04-05-2013
    Location
    CT
    MS-Off Ver
    Excel 2010
    Posts
    360

    Re: Vba to fill row below based on cell value above

    yes awesome! i didn't even think of conditional formatting for some reason.. couldn't think of the formula that i would use. Thanks for the quick response!

+ 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. Specific number of cell to fill with color based in a dynamic cell range
    By Blue_Wings in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-01-2015, 09:46 AM
  2. Specific number of cell to fill with color based in a dynamic cell range
    By Blue_Wings in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-28-2015, 10:10 AM
  3. Replies: 0
    Last Post: 03-20-2014, 10:57 AM
  4. [SOLVED] Fill - need to fill down based on uppermost cell
    By D_N_L in forum Excel General
    Replies: 4
    Last Post: 07-04-2013, 08:53 AM
  5. Replies: 2
    Last Post: 10-26-2012, 09:57 AM
  6. IF statement based on CELL fill or no fill
    By OliB in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-27-2012, 05:12 PM
  7. Create 2 Totals, One Based On Name And One Based On Name And Cell Fill Color
    By PIPPIBOOKS in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-20-2008, 04:41 PM

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