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.
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.
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
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.
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!!!
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
If you only want lastrow formatted then...
Please Login or Register to view this content.
Then it only the one cell.
Heading
A
B
C
Final Final Final Final Final
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.
That is perfect, it works for both the full table and the one column table. Thank you!!
Pleasure...Glad i could help, thanks for rep +
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks