+ Reply to Thread
Results 1 to 10 of 10

Find last row to last column and format just last range

  1. #1
    Registered User
    Join Date
    12-15-2014
    Location
    Wales, UK
    MS-Off Ver
    365
    Posts
    66

    Find last row to last column and format just last range

    I need to find the last row with data and column and format just the last row. Currently, my code is formatting the all the data.

    Please Login or Register  to view this content.
    Last edited by Simone Fick; 07-26-2017 at 07:40 AM.

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Find last row to last column and format just last range

    Hello Simone Fick
    I have tested your code and it works well as it highlighted the last range only ...
    May be better to upload sample of your workbook ..
    Regards
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  3. #3
    Registered User
    Join Date
    12-15-2014
    Location
    Wales, UK
    MS-Off Ver
    365
    Posts
    66

    Re: Find last row to last column and format just last range

    Initially, I had mock-up data just in A1:A5 and A5:D5. So first column and last row(for 5 columns), then it formatted everything. I added more data to the make it more realistic and it worked. No idea why, but thank you.

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,122

    Re: Find last row to last column and format just last range

    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  5. #5
    Registered User
    Join Date
    12-15-2014
    Location
    Wales, UK
    MS-Off Ver
    365
    Posts
    66

    Re: Find last row to last column and format just last range

    It works with a full table of data but still format all the data cells when it looks like the following:

    Heading
    A
    B
    C
    A
    B
    C
    A
    B
    C
    A
    B
    C
    A
    Final Final Final Final Final Final Final Final Final

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,122

    Re: Find last row to last column and format just last range

    If you only want lastrow formatted then...
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    12-15-2014
    Location
    Wales, UK
    MS-Off Ver
    365
    Posts
    66

    Re: Find last row to last column and format just last range

    Then it only the one cell.

    Heading
    A
    B
    C
    Final Final Final Final Final

  8. #8
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,122

    Re: Find last row to last column and format just last range

    Is the Final in columns A B C D E
    and no info above....Then lCol is always gonna be 1

    Edited....If that is the case, the use this for lCol....
    Please Login or Register  to view this content.
    Last edited by sintek; 07-26-2017 at 06:09 AM.

  9. #9
    Registered User
    Join Date
    12-15-2014
    Location
    Wales, UK
    MS-Off Ver
    365
    Posts
    66

    Re: Find last row to last column and format just last range

    That is perfect, it works for both the full table and the one column table. Thank you!!

  10. #10
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,122

    Re: Find last row to last column and format just last range

    Pleasure...Glad i could help, thanks for rep +

+ 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. Sort Select Range: Either Find Column Header or Last Column:Last Row
    By mbryson in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-02-2014, 08:03 AM
  2. Find most recent date in Column Headings in a Range, insert new column and heading
    By mikey3580 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-07-2014, 08:28 AM
  3. Replies: 12
    Last Post: 12-28-2012, 07:49 PM
  4. [SOLVED] find bold number in Column A and copy range to column C
    By joek13 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-24-2012, 10:32 AM
  5. Range.Find to find column and place value in next available cell in one line
    By davegugg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-02-2011, 10:41 AM
  6. Macro to find Column and Format it
    By robertguy in forum Excel General
    Replies: 5
    Last Post: 11-29-2010, 12:00 PM
  7. Replies: 2
    Last Post: 05-02-2008, 07:14 AM

Tags for this Thread

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