+ Reply to Thread
Results 1 to 5 of 5

Excel find lastrow of same values of column and highlight it.

  1. #1
    Registered User
    Join Date
    09-15-2021
    Location
    Heart
    MS-Off Ver
    2016
    Posts
    4

    Excel find lastrow of same values of column and highlight it.

    Hi Genius minds,

    Was hoping if someone can help me with what i am trying to achieve here thru VBA or any?.

    Goal is to auto highlight the lastrow for each different Start time which for example at column "E" is "5:00 PM", "5:30 PM", "6:00 PM", "7:00 PM".

    SamplePic1.JPG
    Last edited by ExcelN123; 01-19-2022 at 12:01 AM.

  2. #2
    Forum Contributor
    Join Date
    08-22-2017
    Location
    USA
    MS-Off Ver
    2016 WINDOWS and MAC
    Posts
    294

    Re: Excel find lastrow of same values of column and highlight it.

    Hi,

    This could be done in VBA of course. But a simple formula can solve this, then conditional formatting based on the result of the formula.

    See attached book. This assumes that times are listed in chronological order and will not function properly if they are not.

    Note: The conditional formatting is not highlighting the entire row, just driver name in my example. Don't have time to **** with Excels PITA conditional formatting rules.

    Edit: BTW, i think your example image is incorrect towards the bottom...
    Attached Files Attached Files

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,835

    Re: Excel find lastrow of same values of column and highlight it.

    Based on your picture
    If you want highlite max row of every 30 min then

    1) Select B2:G400 for example.
    2) Go to Conditional formattig and formula
    =AND(OR(MINUTE($E2)=0,MINUTE($E2)=30),$E2<>"",ROW($E2)=MAX(IF($E$2:$E$400=$E2,ROW($E$2:$E$400))))

  4. #4
    Registered User
    Join Date
    09-15-2021
    Location
    Heart
    MS-Off Ver
    2016
    Posts
    4

    Thumbs up Re: Excel find lastrow of same values of column and highlight it.

    Nice guys, Thanks a lot ironfelix717 for the help.

    Thanks again, i end up with this code and works just fine.

    With Sheets("sheet1").Range("A9:G100")
    .FormatConditions.Add Type:=xlExpression, Formula1:= _
    "=($F9=1)"
    With .FormatConditions(.FormatConditions.count)
    .SetFirstPriority
    Sheets("sheet1").Range("A9:G100").Select
    With .Interior
    .Color = 65535
    End With
    End With
    End With

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,835

    Re: Excel find lastrow of same values of column and highlight it.

    No extra working column...
    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] Find LastRow (based off a specific column) in a Named range and select those cells
    By lday75 in forum Excel Programming / VBA / Macros
    Replies: 29
    Last Post: 06-16-2020, 03:23 PM
  2. Replies: 1
    Last Post: 09-26-2017, 12:05 PM
  3. R1C1 lastRow not lastRow when data combined
    By Spyderwoman in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-28-2016, 05:20 PM
  4. [SOLVED] How to find text then select RANGE form the text found to lastrow of Column J
    By tuongtu3 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-23-2014, 02:45 AM
  5. [SOLVED] Find the LastRow
    By SIMBAtheCAT in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-22-2014, 11:45 AM
  6. Find and highlight the two closese values in a row or column
    By TempusFugit3 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-03-2013, 04:47 AM
  7. Chart how to find lastrow?
    By Craigm in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-06-2006, 11:19 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