Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
delete last-line help.
I have a code that will delete the last line of a spreadsheet -
Range("a65536").End(xlUp).Select Selection.EntireRow.Delete What I'd like it to do is look into that line, and if the value for the cell in column A is MTD_AVG to delete the line, but if it is anything else to leave the line intact. Help please? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
delete last-line help.
With Cells(Rows.Count, 1).End(xlUp)
If InStr(1, .Value, "MTD_AVG", vbBinaryCompare) 0 Then .EntireRow.Delete End If End With -- Jim Cone Portland, Oregon USA Review: http://www.contextures.com/excel-sort-addin.html .. .. .. "Matthew Dyer" wrote in message I have a code that will delete the last line of a spreadsheet - Range("a65536").End(xlUp).Select Selection.EntireRow.Delete What I'd like it to do is look into that line, and if the value for the cell in column A is MTD_AVG to delete the line, but if it is anything else to leave the line intact. Help please? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
delete last-line help.
On Aug 4, 12:01*pm, "Jim Cone" wrote:
With Cells(Rows.Count, 1).End(xlUp) * If InStr(1, .Value, "MTD_AVG", vbBinaryCompare) 0 Then * * .EntireRow.Delete * End If End With -- Jim Cone Portland, Oregon *USA Review: *http://www.contextures.com/excel-sort-addin.html . . . "Matthew Dyer" wrote in message I have a code that will delete the last line of a spreadsheet - Range("a65536").End(xlUp).Select Selection.EntireRow.Delete What I'd like it to do is look into that line, and if the value for the cell in column A is MTD_AVG to delete the line, but if it is anything else to leave the line intact. Help please? works PERFECTLY! Thanks for the quick response! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Challenge - Excel Line Feed Character CHR(10) - How to Delete and keep the text formatting without going ro single line in a cell ? | Excel Programming | |||
Challenge - Excel Line Feed Character CHR(10) - How to Delete and keep the text formatting without going ro single line in a cell ? | Excel Worksheet Functions | |||
Delete first line line(s) of text-file? | Excel Programming | |||
Delete every other line | Excel Programming | |||
how to delete to the end of line | Excel Programming |