+ Reply to Thread
Results 1 to 4 of 4

Change interior colour if cell and cell.offset 1 column is blank.

  1. #1
    Forum Contributor
    Join Date
    10-31-2010
    Location
    london
    MS-Off Ver
    Excel 365
    Posts
    150

    Change interior colour if cell and cell.offset 1 column is blank.

    Hi im trying to change the interior colour of a row if cells b and c are blank, i know my code only changes the one cell at the moment but i'm very new to this and trying to do it one step at a time,

    This code seems to work as i would like

    Please Login or Register  to view this content.
    but when i add the offset it stops working, can anyone point me in the right direction

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    08-14-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    573

    Re: Change interior colour if cell and cell.offset 1 column is blank.

    Hi the problem is with the 'and' operation.

    Try if Cell.value = "" and Cell.offset(0,1).value = "" then

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

    Re: Change interior colour if cell and cell.offset 1 column is blank.

    Hi bopsgtir,

    Change the appersand symbol i.e. & in your code to the word And and then see how that goes.

    HTH

    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

  4. #4
    Forum Contributor
    Join Date
    10-31-2010
    Location
    london
    MS-Off Ver
    Excel 365
    Posts
    150

    Re: Change interior colour if cell and cell.offset 1 column is blank.

    perfect thank you both

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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