Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,311
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Weird: inside of a cell I have a small box or cell I can't delete. ACECOWBOY Excel Discussion (Misc queries) 4 May 2nd 23 03:43 AM
How to delete cell values withour deleting cell formulae perfection Excel Discussion (Misc queries) 5 June 18th 07 09:05 PM
How to delete cell values without affecting cell formulae perfection Excel Discussion (Misc queries) 0 June 18th 07 06:55 AM
Delete cell on 1 page: automatically delete on another page? mountain view Excel Worksheet Functions 0 September 28th 06 04:18 PM
Delete cell contents with input to adjacent cell Ashley Frank Excel Discussion (Misc queries) 1 October 5th 05 04:28 PM


All times are GMT +1. The time now is 12:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"