+ Reply to Thread
Results 1 to 8 of 8

VBA solution to colouring rows withing range.

  1. #1
    Registered User
    Join Date
    01-06-2022
    Location
    UK
    MS-Off Ver
    365
    Posts
    3

    VBA solution to colouring rows withing range.

    Hello ,

    I am trying to create a vb solution to a header problem on an old worksheet within a legacy system.

    There are some fields in the B range which have data and some which do not.
    The ones which do not have data should be coloured yellow, - their row should be coloured yellow from A to L, however the code I have created so far only colours the one cell.
    Can you advice on the A to L part.

    HTML Code: 



    Excel.PNG


    Thank you , Fenge

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,523

    Re: VBA solution to colouring rows withing range.

    Hi Fenge,

    Welcome to the forum!!

    See how this goes:

    Please Login or Register  to view this content.
    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,122

    Re: VBA solution to colouring rows withing range.

    Another Option...
    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  4. #4
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,401

    Re: VBA solution to colouring rows withing range.

    Maybe this will do what you want...
    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor
    Join Date
    06-27-2010
    Location
    sYRIA
    MS-Off Ver
    Excel 2013
    Posts
    669

    Re: VBA solution to colouring rows withing range.

    Your code
    Please Login or Register  to view this content.

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,122

    Re: VBA solution to colouring rows withing range.

    @ Rick... was just gonna post Intersect option and you beat me to it...lol

  7. #7
    Registered User
    Join Date
    01-06-2022
    Location
    UK
    MS-Off Ver
    365
    Posts
    3

    Re: VBA solution to colouring rows withing range.

    Thank you for the solution.
    It was this part (.Range("A" & rCell.Row & ":L" & rCell.Row) ) that I couldn't workout on my own.

    I actually tried all recommended solutions, and all worked well apart from the filter option, I'm not sure why that is.

    Cheers, Fenge

  8. #8
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,122

    Re: VBA solution to colouring rows withing range.

    Apologies...assumed you had data in Col A and image was just example..
    Please Login or Register  to view this content.

+ 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] dropdown selection to check various rows withing a range
    By scrumpywill in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-29-2020, 07:22 PM
  2. Allowing macro to run only when ALL selected cells are withing a range.
    By MrStevie in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-16-2018, 10:43 AM
  3. Moving rows from one sheet to another withing the same workbook
    By amaranthum in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-08-2016, 10:31 AM
  4. [SOLVED] Count hidden cells withing range
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 02-22-2015, 11:43 AM
  5. [SOLVED] How to sum variable cell range withing array?
    By Fibpie in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-31-2014, 09:43 PM
  6. Selecting cells withing a date range
    By v7e8n3e1z2u8e5l in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-25-2013, 06:27 AM
  7. Messages box as warning for changes withing a range
    By mikeyfear in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-23-2008, 03:00 AM

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