+ Reply to Thread
Results 1 to 14 of 14

highlight specific range based on words in multiple sheets

  1. #1
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    highlight specific range based on words in multiple sheets

    hello
    i need help to highlight range from a: j if value in any cell this range "done" then color by red and if value in any cell this range "ok" then color by blue in all of sheets i know i can this with condition formatting but it takes long time if i have huge numbers of sheets i would this by code to do that very quick
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: highlight specific range based on words in multiple sheets

    If I'm not mistaken to get what you mean ...
    Please Login or Register  to view this content.
    Last edited by karmapala; 06-05-2020 at 01:49 PM.

  3. #3
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: highlight specific range based on words in multiple sheets

    thanks , Karmapala not exactly i would highlight the row from a: j if contains the words not only cell contains the word

  4. #4
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: highlight specific range based on words in multiple sheets

    Please have a look the corrected code on post #2, Abdelfatta.
    The code now will highlight the row from A to J if any of row within A to J has "done" or "ok".
    This assumes that there won't be "done" and "ok" in the same row within A to J.
    If there is a situation like that, then this row will have blue color.

  5. #5
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: highlight specific range based on words in multiple sheets

    yes you'r right i no know what's wrong in the beginning it just highlight cells contains the words thank so much that what i want

  6. #6
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: highlight specific range based on words in multiple sheets

    hi, Karmapala is there way to do the row no color if i clear theses words done or ok

  7. #7
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: highlight specific range based on words in multiple sheets

    Quote Originally Posted by ABDELFATTA View Post
    hi, Karmapala is there way to do the row no color if i clear theses words done or ok
    Actually I think you need to do the Conditional Formatting.

    Please wait, I want to record the macro when I manually do the conditional formatting

    Please Login or Register  to view this content.
    The code above will "Conditional Formatting" to every sheet in the workbook.
    Last edited by karmapala; 06-05-2020 at 05:18 PM.

  8. #8
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: highlight specific range based on words in multiple sheets

    it gives me this error
    Attached Images Attached Images

  9. #9
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: highlight specific range based on words in multiple sheets

    Quote Originally Posted by ABDELFATTA View Post
    it gives me this error
    Strange.

    In my side, it didn't give me any error.

    2020-06-06_14-17-54.gif

    Please try to step-run the macro (hit F8),
    then please tell me on what line it gives you the error.

  10. #10
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: highlight specific range based on words in multiple sheets

    the error in this line
    Attached Images Attached Images
    Attached Files Attached Files

  11. #11
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: highlight specific range based on words in multiple sheets

    Quote Originally Posted by ABDELFATTA View Post
    the error in this line
    Strange.

    When I run the macro in your attachment ex.xlsm workbook,
    it doesn't give me an error.

    This is the result after I run the macro:
    2020-06-06_16-21-48.gif
    Last edited by karmapala; 06-06-2020 at 04:22 AM.

  12. #12
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: highlight specific range based on words in multiple sheets

    hi, karmapala you are right it's mystery do me favor ,please can you add line code in post 2# to make the row no color if i clear words done or ok , it supposes to clear the row what contains the word

  13. #13
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: highlight specific range based on words in multiple sheets

    Quote Originally Posted by ABDELFATTA View Post
    hi, karmapala you are right it's mystery do me favor ,
    please can you add line code in post 2# to make the row no color
    if i clear words done or ok
    Abdelfatta,
    The sub in post #2 is not to automatically :
    1. highlight row n column A to J, when user type "done" or "ok" in row n of any column within A to J.
    2. clear the highlight row n column A to J, when user clear the word "done" or "ok" in row n of any column within A to J.

    Below is the sub in post #2 added with one new line
    Please Login or Register  to view this content.
    Please remember that the user still need to click the button, Abdelfatta.

  14. #14
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: highlight specific range based on words in multiple sheets

    yes, this is what i want don't worry about automatically i make it in this change
    HTML Code: 
    it colors when i write and clear when i clear the word the code in post 7# it doesn't work for me i no know why that's why i asked for you adjusting the code i try finding way to solve the problem about code in post #7 if i got it i will inform you now the code is complete thanks so much for everything

+ 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] How to Count specific words in a range of cells based on condition
    By Ell0ll in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-19-2020, 05:13 PM
  2. [SOLVED] Highlight Specific Cells based on multiple criteria
    By rslush91 in forum Excel General
    Replies: 1
    Last Post: 11-15-2018, 12:13 PM
  3. Replies: 1
    Last Post: 12-19-2017, 06:50 AM
  4. Formula to highlight cells based on multiple criteria and sheets.
    By cascencio83 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-16-2015, 10:18 PM
  5. Replies: 15
    Last Post: 10-12-2014, 08:53 AM
  6. search & highlight specific words from list in workbook
    By venexcel in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-27-2012, 02:34 PM
  7. Highlight a row if a specific cell is specific numbers/words
    By sea0221 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-08-2005, 09:06 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