+ Reply to Thread
Results 1 to 9 of 9

Macro on blank ROWS

  1. #1
    Registered User
    Join Date
    08-12-2014
    Location
    Delmas
    MS-Off Ver
    2012
    Posts
    22

    Macro on blank ROWS

    Hi, I actually have two requests, please could someone assist?

    I want to colour all blank rows in a spreadsheet yellow and bold. somehow I am just not getting it right.

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

    Re: Macro on blank ROWS

    well you could use conditional formatting to do this.

    highlight the rows you want it to apply to and with A1 active apply the conditional format rule with a formula:
    =COUNTIF(1:1,"<>")=0
    then set to yellow fill for true.

    However, it seems redundant setting blank rows to bold, as they will be empty. So I'm guessing you want to permanently change the format rather than a conditional format, in which case:
    Please Login or Register  to view this content.
    which will change the colour of all the empty rows:
    Please Login or Register  to view this content.
    which will change back rows that were coloured and are no longer empty

  3. #3
    Registered User
    Join Date
    08-12-2014
    Location
    Delmas
    MS-Off Ver
    2012
    Posts
    22

    Re: Macro on blank ROWS

    Thank you so much!!! Your first macro has worked like a charm!!!! Yes, the bold is to prepare the cells in the blank rows for totals to follow, which brings me to my next question. I would like to add totals automatically to certain collums (I will demonstrate)

    2014-07-16 1,28 0:13:25
    2014-07-16 330,22 4:54:51
    2014-07-16 46,78 1:00:39
    2014-07-16 0,17 0:06:31
    2014-07-16 10,49 0:35:50
    2014-07-16 473,65 6:11:47
    862,59 13:03:03 (This is the total row which is filled yellow and bold) and which I would like to automatically then add the total
    2014-07-17 272,27 3:15:08
    2014-07-17 73,89 0:59:10
    2014-07-17 31,69 0:26:50
    2014-07-17 249,27 4:17:11
    2014-07-17 1,10 0:08:58
    2014-07-17 12,96 0:22:21
    2014-07-17 1,56 0:09:47
    2014-07-17 7,23 0:23:49
    2014-07-17 0,69 0:02:53
    2014-07-17 0,19 0:02:34
    2014-07-17 11,67 0:16:54
    662,53 10:25:35 (This is the total row which is filled yellow and bold)2014-07-19 8,76 0:22:22
    2014-07-19 7,14 0:22:44
    15,90 0:45:06

  4. #4
    Registered User
    Join Date
    08-12-2014
    Location
    Delmas
    MS-Off Ver
    2012
    Posts
    22

    Re: Macro on blank ROWS

    Picture1.png

    This is what it actually looks like

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

    Re: Macro on blank ROWS

    Hi,

    Please upload a workbook, rather than a picture, and I'll have a go. I would guess you would do something like:

    Please Login or Register  to view this content.
    Where A is the column you want the sum in.

  6. #6
    Registered User
    Join Date
    08-12-2014
    Location
    Delmas
    MS-Off Ver
    2012
    Posts
    22

    Re: Macro on blank ROWS

    Hi the macro works perfectly although it gives me a #Name? error where the total s should be
    Attached Files Attached Files

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

    Re: Macro on blank ROWS

    Try:
    Please Login or Register  to view this content.

  8. #8
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Macro on blank ROWS

    I think this line:

    Please Login or Register  to view this content.
    Should be:

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    08-12-2014
    Location
    Delmas
    MS-Off Ver
    2012
    Posts
    22

    Re: Macro on blank ROWS

    Thank you thank you, ragulduy, you are an absolute genius!!!

+ 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. How to create a macro to insert blank rows and copy data into blank rows?
    By zodiack101 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-29-2013, 01:18 PM
  2. Macro to delete blank rows if column I is blank for the row
    By tiger10012 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-10-2013, 03:01 PM
  3. [SOLVED] Macro to insert blank rows below rows with values
    By haleakala17 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-10-2013, 11:48 AM
  4. [SOLVED] Macro to insert blank rows so that the total number of rows with data is equal to 1021
    By nsm1411 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-07-2013, 10:25 AM
  5. Macro to delete blank rows in macro
    By Danielle123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-30-2009, 03:59 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