LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default cell clearance

Hi, I got some excellent code last week from Tom Ogilvy
that
clears some cells if only the first couple are populated

ABCDEFGHIJKLMNOPQRSTU
XXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXX
XXX
XXX
XXX
It works great, but what variable do i need to change if i
have a row like
ABCDEFGHIJKLMNOPQRSTU
XXXXXXX XXXXXX
because it is bringing up the information from the cells
below
ABCDEFGHIJKLMNOPQRSTU
XXXXXXXXXXXXXXXXXXXXX
XXXX^^^^^^^^^XXXXXXXX
XXXX XXXXXXXX
the code i use is:
Dim rng As Range, cell As Range
Set rng = Cells(Rows.Count, 1).End(xlUp).Offset(0, 2)
For i = rng.Row To 1 Step -1
Set cell = Cells(i, 4)
cnt = 0
For Each cell1 In cell.Resize(1, 18)
If Len(Trim(cell1.Text)) = 0 Then
cnt = cnt + 1
End If
Next
If cnt = 18 Then
Cells(cell.Row, 1).EntireRow.Delete
End If


 
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
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing Options Yuvraj Excel Discussion (Misc queries) 0 June 29th 09 11:20 AM
Efficient data clearance in Excel spreadsheets joatmon Excel Discussion (Misc queries) 3 May 21st 08 04:09 PM
How to create/run "cell A equals Cell B put Cell C info in Cell D abmb161 Excel Discussion (Misc queries) 5 January 26th 06 06:36 PM
Creating a check box that does not require security clearance. Maverick2U Excel Worksheet Functions 6 December 14th 04 02:46 AM


All times are GMT +1. The time now is 11:20 PM.

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

About Us

"It's about Microsoft Excel"