+ Reply to Thread
Results 1 to 4 of 4

Adding new rows and highlighting the last row of the tab

  1. #1
    Registered User
    Join Date
    05-23-2014
    Posts
    10

    Adding new rows and highlighting the last row of the tab

    Hello,

    is there a way to accomplish adding multiple rows to the tabs and highlighting the last row? Please do see attachment file.

    Tabs have different sizes and are not always at the same positions.

    I would welcome any help on how to automatize this process or at least make it easier - adding new rows, highlighting last row.

    Thanks in advance,

    Tom
    Attached Files Attached Files

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Adding new rows and highlighting the last row of the tab

    What version of Excel are you using? If you have Excel 2007 or later then the problem becomes simpler. I have an example on sheet 1. The conditional format is applied to the table, and the formula is: =ROW() =COUNTA($A:$A).

    This will also work with a range instead of table, but tables know how many row they have so the "applies to" range of cells grows only as big as it needs to. With a range if you don't specify enough rows, the conditional format will fail eventually. If you specify too many, you will slow down the spreadsheet unnecessarily by checking rows that don't need to be checked.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    05-23-2014
    Posts
    10

    Re: Adding new rows and highlighting the last row of the tab

    Hello, thanks for it. It is working quite nicely, but I can't make it work in my own tables. Can you take a look and tell me what am I doing wrong?
    Attached Files Attached Files

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Adding new rows and highlighting the last row of the tab

    This is a more complicated layout. The table doesn't start on row 1 and there is additional information on rows below it which cause the COUNTA to fail.

    You are going to have to invoke a helper cell (It can be anywhere in the workbook, even on a hidden sheet) I chose Cell M10 and it has the formula:
    =COUNTA(Tabulka4[Sloupec1])+10 - This gets the number of rows in the table + 10. The plus 10 is because the table starts in row 10.

    The Conditional formatting then becomes: =ROW() =$M$10

    I tried replacing $M$10 with COUNTA(Tabulka4[Sloupec1])+10, but the conditional formatting can't handle it so it has to remain as a helper cell.
    Attached Files Attached Files

+ 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. Replies: 6
    Last Post: 04-23-2015, 03:55 AM
  2. highlighting rows
    By JakeMann in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-05-2015, 12:04 PM
  3. [SOLVED] Highlighting multiple rows through a worksheet depending a cell value in the rows
    By loked in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-19-2014, 01:31 AM
  4. VBA for adding new stock to old spreadsheet without repeating, then highlighting said cell
    By eltocliousus in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 10-03-2013, 01:33 AM
  5. Highlighting Rows
    By Justin.Kropetz in forum Excel General
    Replies: 1
    Last Post: 04-16-2013, 01:53 PM
  6. highlighting rows
    By legolas in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 05-31-2010, 07:17 AM
  7. Highlighting Rows
    By mem in forum Excel General
    Replies: 2
    Last Post: 10-26-2005, 07:05 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