ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Highlighting last available cell in bold (https://www.excelbanter.com/excel-programming/282278-highlighting-last-available-cell-bold.html)

ed

Highlighting last available cell in bold
 
Hi

A couple of questions:

1.I need some VBA to highlight the last row in a cell bold.
2.Is there someway you can check the two last values (in
column A)of a list and if they are identicle delete one of
the last row in the list.
3.Also how could i save this wb as the value of the last
value in column A.
Thanks very much for your help.

Ron de Bruin

Highlighting last available cell in bold
 
If I have understand you corect try this

Sub test1()
Dim LR As Long
LR = Range("A" & Rows.Count).End(xlUp).Row
Cells(LR, "A").Font.Bold = True
End Sub

'Or do you want to select it
Cells(LR, "A").Select


Sub test2()
Dim LR As Long
LR = Range("A" & Rows.Count).End(xlUp).Row
If Cells(LR, "A").Value = Cells(LR - 1, "A").Value Then
Cells(LR, "A").EntireRow.Delete ' Or do you only want to clear the cell?
End If
End Sub


Sub test3()
LR = Range("A" & Rows.Count).End(xlUp).Row
ActiveWorkbook.SaveAs "C:\" & Cells(LR, "A").Value & ".xls"
End Sub



--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Ed" wrote in message ...
Hi

A couple of questions:

1.I need some VBA to highlight the last row in a cell bold.
2.Is there someway you can check the two last values (in
column A)of a list and if they are identicle delete one of
the last row in the list.
3.Also how could i save this wb as the value of the last
value in column A.
Thanks very much for your help.





All times are GMT +1. The time now is 05:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com