Highlighting last available cell in bold

E

Ed

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.
 
R

Ron de Bruin

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top