+ Reply to Thread
Results 1 to 13 of 13

Create a Macro to turn a range of cells (a row) yellow if the word "Total%" is in cell Bx

  1. #1
    Registered User
    Join Date
    10-10-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Create a Macro to turn a range of cells (a row) yellow if the word "Total%" is in cell Bx

    I am wanting to have a macro run after refresh is done on the spread sheet.

    The key is in Column 'B' search for the rows that have the text 'Total' (number follows the text)
    and turn that row and column A through K Yellow
    and make the cells height 31 pixels (instead of the 25 like the others)

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Create a Macro to turn a range of cells (a row) yellow if the word "Total%" is in cell

    Hi jaymz69,

    Welcome to the Forum.!

    You don't need Code for that. Use Conditional Formatting.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Registered User
    Join Date
    10-10-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Create a Macro to turn a range of cells (a row) yellow if the word "Total%" is in cell

    Thanks,
    How do I do that?
    Last edited by Cutter; 10-15-2012 at 05:46 PM. Reason: Removed whole post quote

  4. #4
    Forum Contributor
    Join Date
    03-28-2012
    Location
    Pennsylvania, USA
    MS-Off Ver
    Excel 2010
    Posts
    166

    Re: Create a Macro to turn a range of cells (a row) yellow if the word "Total%" is in cell

    Under Format on the menu go down to conditional formatting and select this; Cell value is > go over to the next column hit the drop down arrow and select is equal to Total in the third box. Then select Format, border select yellow and apply. Hope this helps!

  5. #5
    Registered User
    Join Date
    10-10-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Create a Macro to turn a range of cells (a row) yellow if the word "Total%" is in cell

    I see how the conditional formmatting works but it only highlights the cell that has the text 'Total'

    I need it to highlight the rows A - K which have the total numbers too - but only the rows where the text 'Total' is.

  6. #6
    Forum Contributor
    Join Date
    03-28-2012
    Location
    Pennsylvania, USA
    MS-Off Ver
    Excel 2010
    Posts
    166

    Re: Create a Macro to turn a range of cells (a row) yellow if the word "Total%" is in cell

    Include a example of your workbook, so we can follow the progression you would like.

  7. #7
    Registered User
    Join Date
    10-10-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Create a Macro to turn a range of cells (a row) yellow if the word "Total%" is in cell

    here is what I mean by the Total row A-K getting highlighted.
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    03-28-2012
    Location
    Pennsylvania, USA
    MS-Off Ver
    Excel 2010
    Posts
    166

    Re: Create a Macro to turn a range of cells (a row) yellow if the word "Total%" is in cell

    Please Login or Register  to view this content.
    You can give this a try.

  9. #9
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Create a Macro to turn a range of cells (a row) yellow if the word "Total%" is in cell

    Hi jaymz69,

    The attached WorkBook will show you how it is done.

    Also see the "Please consider" note at the bottom of this post.
    Attached Files Attached Files

  10. #10
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Create a Macro to turn a range of cells (a row) yellow if the word "Total%" is in cell

    Hi LeapingLizard,

    Built in Excel Functions are, by far superior and much faster, than any VBA.

    But thank you for your contribution as well.

  11. #11
    Forum Contributor
    Join Date
    03-28-2012
    Location
    Pennsylvania, USA
    MS-Off Ver
    Excel 2010
    Posts
    166

    Re: Create a Macro to turn a range of cells (a row) yellow if the word "Total%" is in cell

    No problem Winon just trying to help. I am always learn too.

    LeapingLizard

  12. #12
    Registered User
    Join Date
    10-10-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Create a Macro to turn a range of cells (a row) yellow if the word "Total%" is in cell

    What did you do to the sheet?

  13. #13
    Registered User
    Join Date
    10-10-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Create a Macro to turn a range of cells (a row) yellow if the word "Total%" is in cell

    Not sure what you did to the sheet winon?
    Last edited by Cutter; 10-15-2012 at 05:47 PM. Reason: Removed whole post quote

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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