+ Reply to Thread
Results 1 to 9 of 9

Highlighting rows with macro/function

  1. #1
    Registered User
    Join Date
    06-17-2014
    Location
    Denmark
    MS-Off Ver
    2013
    Posts
    21

    Highlighting rows with macro/function

    Hi there

    I'm quite new to excel and needs to solve a very specific problem. Goes like:

    If column A, row i, equals "x" and column B, row i, is empty => highlight row i

    I want the sequence to check all rows in the spreadsheet.


    Hope you can help
    \Xanthom

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Highlighting rows with macro/function

    Highlight all the cells and with A1 active, assign the conditional formatting formula:
    =AND(A1="x",B1="")
    then set your format as necessary to highlight the row.

  3. #3
    Registered User
    Join Date
    06-17-2014
    Location
    Denmark
    MS-Off Ver
    2013
    Posts
    21

    Re: Highlighting rows with macro/function

    sorry, what do you mean by "with A1 active"?

    thanks for the quick reply

  4. #4
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Highlighting rows with macro/function

    Select A1, then press ctrl+a (select all), this will give you all the cells selected but with A1 active.

  5. #5
    Registered User
    Join Date
    06-17-2014
    Location
    Denmark
    MS-Off Ver
    2013
    Posts
    21

    Re: Highlighting rows with macro/function

    Capture.PNG

    Does this look right? I cant seem to get it working - sorry for danish version of excel btw, hope it makes sense anyway

  6. #6
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Highlighting rows with macro/function

    I think so, can you upload the workbook rather than a screenshot?

  7. #7
    Registered User
    Join Date
    06-17-2014
    Location
    Denmark
    MS-Off Ver
    2013
    Posts
    21

    Re: Highlighting rows with macro/function

    Mappe1.xlsx

    there we go

  8. #8
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Highlighting rows with macro/function

    Take a look at the example

  9. #9
    Registered User
    Join Date
    06-17-2014
    Location
    Denmark
    MS-Off Ver
    2013
    Posts
    21

    Re: Highlighting rows with macro/function

    yes! thank you. its finally working - appreciate it

+ 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 Do I Write a Macro for Highlighting Rows Based on Date Criteria
    By TMack in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-21-2013, 11:15 AM
  2. Replies: 2
    Last Post: 02-06-2013, 12:13 AM
  3. [SOLVED] Highlighting Rows Macro
    By shep123 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-04-2012, 10:09 AM
  4. Replies: 2
    Last Post: 04-14-2011, 12:34 PM
  5. Macro for Highlighting Rows based on Cell Value
    By ExcelNoobNJ in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-29-2008, 08:08 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