Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
delete next cell
Hi all, I've 2 columns:about 500 rows long. I dont need the rows where column
A contains a number ending in D such as 123-D. can anyone suggest a quick way of deleting theses. I have over 10 sheets with hundreds of items . Thanks agin. A B 100-C Description 123-D Description 130-D Description 500-T Description -- delmac |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
delete next cell
try something like this
for each ws in worksheets with ws for i=.cells(.rows.count,1).end(xlup).row if ucase(right(.cells(i,1),1))="D" then .rows(i).delete end with next ws next i -- Don Guillett SalesAid Software "delmac" wrote in message ... Hi all, I've 2 columns:about 500 rows long. I dont need the rows where column A contains a number ending in D such as 123-D. can anyone suggest a quick way of deleting theses. I have over 10 sheets with hundreds of items . Thanks agin. A B 100-C Description 123-D Description 130-D Description 500-T Description -- delmac |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
delete next cell
This will clear the contents of the entire row if the value in A of the
current row ends with "D". Once completed, you would then need to sort your data to remove the empty rows. Sub test() For Each cell In Range("A1:A" & Range("A65536").End(xlUp).Row) If Right(cell, 1) = "D" Then cell.EntireRow.ClearContents Next cell End Sub HTH, Paul "delmac" wrote in message ... Hi all, I've 2 columns:about 500 rows long. I dont need the rows where column A contains a number ending in D such as 123-D. can anyone suggest a quick way of deleting theses. I have over 10 sheets with hundreds of items . Thanks agin. A B 100-C Description 123-D Description 130-D Description 500-T Description -- delmac |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Weird: inside of a cell I have a small box or cell I can't delete. | Excel Discussion (Misc queries) | |||
How to delete cell values withour deleting cell formulae | Excel Discussion (Misc queries) | |||
How to delete cell values without affecting cell formulae | Excel Discussion (Misc queries) | |||
Delete cell on 1 page: automatically delete on another page? | Excel Worksheet Functions | |||
Delete cell contents with input to adjacent cell | Excel Discussion (Misc queries) |