+ Reply to Thread
Results 1 to 2 of 2

Select Row based on cell criteria, remove all formulas from row and change fill color

  1. #1
    Registered User
    Join Date
    04-23-2014
    Location
    PNW
    MS-Off Ver
    Excel 2010
    Posts
    1

    Select Row based on cell criteria, remove all formulas from row and change fill color

    I have a worksheet that when a row changes based on the value of column B, I want to remove all of the formulas found in the row but keep the existing values, and then change the color of the row.

    In the sample file attached, when the value is "Closed", that row will keep the existing values and then it gets grayed out. Rows that are still marked "Open" need to retain the formulas in case other information changes.

    I have tried copy/paste special using autofiltering but that doesn't work because of the hidden lines. This file changes on a daily basis and I need a quick way to update the file. I've spent several hours researching and testing various code without success so now I am turning to the experts for help.Sally-SampleFile.xlsx

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Select Row based on cell criteria, remove all formulas from row and change fill color

    Hello SallyAS,

    You can add this macro to your worksheet. This highlight the row in gray, and replace formulas with values when the cell in column "B"equals "Closed".

    Please Login or Register  to view this content.
    How to Paste a Macro into a Worksheet
    1. Copy the macro with Ctrl+C.
    2. Right Click the Sheet Tab at the bottom of the worksheet.
    3. Click View Code
    4. Paste the macro into the module with Ctrl+V.
    5. Save the macro using Ctrl+S
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ 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. Macro to change cell text color based on darkness of cell fill color
    By cincyshirm61 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-25-2014, 12:11 PM
  2. change fill color of a range of cells based on color of a cell?
    By DarMelNel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-20-2014, 04:48 PM
  3. Using formulas/conditional formatting to change fill of cell based on two criteria
    By 121jessawatts in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-09-2013, 09:42 PM
  4. Change fill color based on another cell
    By George3232 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-02-2010, 02:38 PM
  5. Color Fill Cell Based on Criteria
    By frankee_gee in forum Excel General
    Replies: 3
    Last Post: 04-24-2008, 02:55 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