+ Reply to Thread
Results 1 to 8 of 8

IF Color and Text Match then Subtract

  1. #1
    Forum Contributor
    Join Date
    05-23-2017
    Location
    Bang, India
    MS-Off Ver
    MS Office 2007
    Posts
    221

    IF Color and Text Match then Subtract

    How to structure an IF statement based on a specific cell color. If a cell is yellow and has text “Done” then it has to subtract 1 from another cell which has a value of 50 and it has to loop through? Need code for this......

  2. #2
    Valued Forum Contributor
    Join Date
    07-10-2017
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2013
    Posts
    430

    Re: IF Color and Text Match then Subtract

    It would be something like this (can't really be more specific without an example workbook)
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    05-23-2017
    Location
    Bang, India
    MS-Off Ver
    MS Office 2007
    Posts
    221

    Re: IF Color and Text Match then Subtract

    I am enclosing the excel sheet for your reference.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: IF Color and Text Match then Subtract

    See if this does what you require.
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor
    Join Date
    07-10-2017
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2013
    Posts
    430

    Re: IF Color and Text Match then Subtract

    I had a similar idea to John. Only difference is it updates no matter which cell you select, and will not decrease twice if you select a yellow cell with "Done" again.
    On the downside, it will only work with a starting value of 50 (unless you tell me how you got the value).
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    05-23-2017
    Location
    Bang, India
    MS-Off Ver
    MS Office 2007
    Posts
    221

    Re: IF Color and Text Match then Subtract

    Thank you both John and Daniel........you both are really great.........and Daniel your solution is excellent...... and as for that value of 50 (it is arrived by a Range in Column B which has names) and its unique value is this 50 or sometimes more or less. I am sending you a modified better version of excel sheet so that you can have a look.....
    one of our team guys tried his best to modify this.....any doubts please raise it....as we are novice in this .............Also, for your information....we are using MS Office 2007 and this workbook with macro sent by Daniel was responding very slow.............Your suggestions are welcome...

  7. #7
    Valued Forum Contributor
    Join Date
    07-10-2017
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2013
    Posts
    430

    Re: IF Color and Text Match then Subtract

    Do you mind manually running the macro every time you want an update, or does it have to auto update based on changing selection? I'm guessing this is what is causing it to run slowly

  8. #8
    Forum Contributor
    Join Date
    05-23-2017
    Location
    Bang, India
    MS-Off Ver
    MS Office 2007
    Posts
    221

    Re: IF Color and Text Match then Subtract

    dan....we need it to auto update .....thanks once 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. Same color applied to a text box and a cell don't match
    By 4orust in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 7
    Last Post: 01-07-2016, 04:46 PM
  2. Compare two excel and mismatch text should be display in red color and match text in green
    By aadityapatel1984 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-01-2014, 04:22 PM
  3. Replies: 4
    Last Post: 12-29-2013, 11:41 PM
  4. [SOLVED] Compare Colums and Color enire row if values (text) do not match
    By GatorsBucs in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-27-2013, 11:43 AM
  5. Match & change color of matching text only
    By PolishPaul in forum Excel General
    Replies: 4
    Last Post: 12-06-2009, 06:15 PM
  6. [SOLVED] Keep text color from a Index Match Formula
    By Woody in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-21-2005, 01:05 PM
  7. change text color based on adjacent cell text color
    By matthewst in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-01-2005, 03:49 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