Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default delete rows with empty cells

I need to delete rows when certain columns have empty cells.
ColA ColB ColC ColD
data y y
data
data y y
data y y y

What I need to do is delete row2 because columns B,C & D are empty.

How can I do this?
--
Thanks
Slohcin
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,173
Default delete rows with empty cells

Slohcin

I would set up a helper column in E and enter

=IF(AND(B1="",C1="",D1=""),"x","")

Then copy down and sort on that column and delete all the rows with an x in

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Slohcin" wrote in message
...
I need to delete rows when certain columns have empty cells.
ColA ColB ColC ColD
data y y
data
data y y
data y y y

What I need to do is delete row2 because columns B,C & D are empty.

How can I do this?
--
Thanks
Slohcin


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default delete rows with empty cells

Nick,
Thanks for your reply.
I have tried what you suggested, but nothing happens. I was expecting an "x"
in column E, but get nothing. What am I doing wrong?
--
Thanks
Slohcin


"Nick Hodge" wrote:

Slohcin

I would set up a helper column in E and enter

=IF(AND(B1="",C1="",D1=""),"x","")

Then copy down and sort on that column and delete all the rows with an x in

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Slohcin" wrote in message
...
I need to delete rows when certain columns have empty cells.
ColA ColB ColC ColD
data y y
data
data y y
data y y y

What I need to do is delete row2 because columns B,C & D are empty.

How can I do this?
--
Thanks
Slohcin



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,173
Default delete rows with empty cells

Slohcin

That's what happen here. Are you sure A,B and C are empty? No formula, or
similar?

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Slohcin" wrote in message
...
Nick,
Thanks for your reply.
I have tried what you suggested, but nothing happens. I was expecting an
"x"
in column E, but get nothing. What am I doing wrong?
--
Thanks
Slohcin


"Nick Hodge" wrote:

Slohcin

I would set up a helper column in E and enter

=IF(AND(B1="",C1="",D1=""),"x","")

Then copy down and sort on that column and delete all the rows with an x
in

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Slohcin" wrote in message
...
I need to delete rows when certain columns have empty cells.
ColA ColB ColC ColD
data y y
data
data y y
data y y y

What I need to do is delete row2 because columns B,C & D are empty.

How can I do this?
--
Thanks
Slohcin




  #5   Report Post  
Posted to microsoft.public.excel.misc
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default delete rows with empty cells

ASAP Utilities, a free add-in available at www.asap-utilities.com has a
feature that will do that for you.

Vaya con Dios,
Chuck, CABGx3



"Slohcin" wrote:

I need to delete rows when certain columns have empty cells.
ColA ColB ColC ColD
data y y
data
data y y
data y y y

What I need to do is delete row2 because columns B,C & D are empty.

How can I do this?
--
Thanks
Slohcin



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default delete rows with empty cells

Sub deleteemptyrows()
For i = 17 to 2 step -1 'from bottom up
If Application.CountA(Range(Cells(i, 1), Cells(i, 3))) < 1 _
Then Rows(i).Delete
Next i
End Sub

--
Don Guillett
SalesAid Software

"Slohcin" wrote in message
...
I need to delete rows when certain columns have empty cells.
ColA ColB ColC ColD
data y y
data
data y y
data y y y

What I need to do is delete row2 because columns B,C & D are empty.

How can I do this?
--
Thanks
Slohcin



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default delete rows with empty cells

Let's modify a bit

Sub deleteemptyrows()
For i = cells(rows.count,"a").end(xlup).row to 2 step -1
If Application.CountA(Range(Cells(i, 2), Cells(i, 4))) < 1 _
Then Rows(i).Delete
Next i
End Sub

--
Don Guillett
SalesAid Software

"Don Guillett" wrote in message
...
Sub deleteemptyrows()
For i = 17 to 2 step -1 'from bottom up
If Application.CountA(Range(Cells(i, 1), Cells(i, 3))) < 1 _
Then Rows(i).Delete
Next i
End Sub

--
Don Guillett
SalesAid Software

"Slohcin" wrote in message
...
I need to delete rows when certain columns have empty cells.
ColA ColB ColC ColD
data y y
data
data y y
data y y y

What I need to do is delete row2 because columns B,C & D are empty.

How can I do this?
--
Thanks
Slohcin





  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default delete rows with empty cells

Nick,
Column A will always have an entry. As I tried to illustrate in my example,
Columns B,C+D may or may not have an entry. I am looking to delete any row
where B,C +D are empty/blank. There are no formulas used.
--
Thanks
Slohcin


"Nick Hodge" wrote:

Slohcin

That's what happen here. Are you sure A,B and C are empty? No formula, or
similar?

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Slohcin" wrote in message
...
Nick,
Thanks for your reply.
I have tried what you suggested, but nothing happens. I was expecting an
"x"
in column E, but get nothing. What am I doing wrong?
--
Thanks
Slohcin


"Nick Hodge" wrote:

Slohcin

I would set up a helper column in E and enter

=IF(AND(B1="",C1="",D1=""),"x","")

Then copy down and sort on that column and delete all the rows with an x
in

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Slohcin" wrote in message
...
I need to delete rows when certain columns have empty cells.
ColA ColB ColC ColD
data y y
data
data y y
data y y y

What I need to do is delete row2 because columns B,C & D are empty.

How can I do this?
--
Thanks
Slohcin




  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,173
Default delete rows with empty cells

Slohcin

Then the formula should work.

Can you set up helper columns to return the contents of cells in columns B,
C &D thus

=ISBLANK(B1)
=ISBLANK(C1)
=ISBLANK(D1)

and copy down

Where a cell is 'thought' by eye to be empty you should get TRUE. If you get
TRUE in any row in B, C & D the formula using that same row should put an x
in the cell to sort on

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Slohcin" wrote in message
...
Nick,
Column A will always have an entry. As I tried to illustrate in my
example,
Columns B,C+D may or may not have an entry. I am looking to delete any row
where B,C +D are empty/blank. There are no formulas used.
--
Thanks
Slohcin


"Nick Hodge" wrote:

Slohcin

That's what happen here. Are you sure A,B and C are empty? No formula,
or
similar?

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Slohcin" wrote in message
...
Nick,
Thanks for your reply.
I have tried what you suggested, but nothing happens. I was expecting
an
"x"
in column E, but get nothing. What am I doing wrong?
--
Thanks
Slohcin


"Nick Hodge" wrote:

Slohcin

I would set up a helper column in E and enter

=IF(AND(B1="",C1="",D1=""),"x","")

Then copy down and sort on that column and delete all the rows with
an x
in

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Slohcin" wrote in message
...
I need to delete rows when certain columns have empty cells.
ColA ColB ColC ColD
data y y
data
data y y
data y y y

What I need to do is delete row2 because columns B,C & D are empty.

How can I do this?
--
Thanks
Slohcin





  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default delete rows with empty cells

Nick,
Thanks for your help. It appears that columns B,C & D are not blank but
contain a space. I have amended your original formula to cater for this and
it now works.
--
Thanks
Slohcin


"Nick Hodge" wrote:

Slohcin

Then the formula should work.

Can you set up helper columns to return the contents of cells in columns B,
C &D thus

=ISBLANK(B1)
=ISBLANK(C1)
=ISBLANK(D1)

and copy down

Where a cell is 'thought' by eye to be empty you should get TRUE. If you get
TRUE in any row in B, C & D the formula using that same row should put an x
in the cell to sort on

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Slohcin" wrote in message
...
Nick,
Column A will always have an entry. As I tried to illustrate in my
example,
Columns B,C+D may or may not have an entry. I am looking to delete any row
where B,C +D are empty/blank. There are no formulas used.
--
Thanks
Slohcin


"Nick Hodge" wrote:

Slohcin

That's what happen here. Are you sure A,B and C are empty? No formula,
or
similar?

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Slohcin" wrote in message
...
Nick,
Thanks for your reply.
I have tried what you suggested, but nothing happens. I was expecting
an
"x"
in column E, but get nothing. What am I doing wrong?
--
Thanks
Slohcin


"Nick Hodge" wrote:

Slohcin

I would set up a helper column in E and enter

=IF(AND(B1="",C1="",D1=""),"x","")

Then copy down and sort on that column and delete all the rows with
an x
in

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Slohcin" wrote in message
...
I need to delete rows when certain columns have empty cells.
ColA ColB ColC ColD
data y y
data
data y y
data y y y

What I need to do is delete row2 because columns B,C & D are empty.

How can I do this?
--
Thanks
Slohcin








  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,173
Default delete rows with empty cells

Slohcin

Glad it works. Did you handle the space " " or did you put a TRIM around
each reference

=IF(AND(TRIM(B1)=""............

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Slohcin" wrote in message
...
Nick,
Thanks for your help. It appears that columns B,C & D are not blank but
contain a space. I have amended your original formula to cater for this
and
it now works.
--
Thanks
Slohcin


"Nick Hodge" wrote:

Slohcin

Then the formula should work.

Can you set up helper columns to return the contents of cells in columns
B,
C &D thus

=ISBLANK(B1)
=ISBLANK(C1)
=ISBLANK(D1)

and copy down

Where a cell is 'thought' by eye to be empty you should get TRUE. If you
get
TRUE in any row in B, C & D the formula using that same row should put an
x
in the cell to sort on

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Slohcin" wrote in message
...
Nick,
Column A will always have an entry. As I tried to illustrate in my
example,
Columns B,C+D may or may not have an entry. I am looking to delete any
row
where B,C +D are empty/blank. There are no formulas used.
--
Thanks
Slohcin


"Nick Hodge" wrote:

Slohcin

That's what happen here. Are you sure A,B and C are empty? No
formula,
or
similar?

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Slohcin" wrote in message
...
Nick,
Thanks for your reply.
I have tried what you suggested, but nothing happens. I was
expecting
an
"x"
in column E, but get nothing. What am I doing wrong?
--
Thanks
Slohcin


"Nick Hodge" wrote:

Slohcin

I would set up a helper column in E and enter

=IF(AND(B1="",C1="",D1=""),"x","")

Then copy down and sort on that column and delete all the rows
with
an x
in

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Slohcin" wrote in message
...
I need to delete rows when certain columns have empty cells.
ColA ColB ColC ColD
data y y
data
data y y
data y y y

What I need to do is delete row2 because columns B,C & D are
empty.

How can I do this?
--
Thanks
Slohcin







  #12   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default delete rows with empty cells

Nick,
Did it with space " ", is this the best way?
I would like to run this as a macro, is this possible?
--
Thanks
Slohcin


"Nick Hodge" wrote:

Slohcin

Glad it works. Did you handle the space " " or did you put a TRIM around
each reference

=IF(AND(TRIM(B1)=""............

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Slohcin" wrote in message
...
Nick,
Thanks for your help. It appears that columns B,C & D are not blank but
contain a space. I have amended your original formula to cater for this
and
it now works.
--
Thanks
Slohcin


"Nick Hodge" wrote:

Slohcin

Then the formula should work.

Can you set up helper columns to return the contents of cells in columns
B,
C &D thus

=ISBLANK(B1)
=ISBLANK(C1)
=ISBLANK(D1)

and copy down

Where a cell is 'thought' by eye to be empty you should get TRUE. If you
get
TRUE in any row in B, C & D the formula using that same row should put an
x
in the cell to sort on

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Slohcin" wrote in message
...
Nick,
Column A will always have an entry. As I tried to illustrate in my
example,
Columns B,C+D may or may not have an entry. I am looking to delete any
row
where B,C +D are empty/blank. There are no formulas used.
--
Thanks
Slohcin


"Nick Hodge" wrote:

Slohcin

That's what happen here. Are you sure A,B and C are empty? No
formula,
or
similar?

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Slohcin" wrote in message
...
Nick,
Thanks for your reply.
I have tried what you suggested, but nothing happens. I was
expecting
an
"x"
in column E, but get nothing. What am I doing wrong?
--
Thanks
Slohcin


"Nick Hodge" wrote:

Slohcin

I would set up a helper column in E and enter

=IF(AND(B1="",C1="",D1=""),"x","")

Then copy down and sort on that column and delete all the rows
with
an x
in

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Slohcin" wrote in message
...
I need to delete rows when certain columns have empty cells.
ColA ColB ColC ColD
data y y
data
data y y
data y y y

What I need to do is delete row2 because columns B,C & D are
empty.

How can I do this?
--
Thanks
Slohcin







  #13   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,173
Default delete rows with empty cells

Slohcin

I would rather acknowledge they were there and deal with them with say TRIM.

Here is some code that should work for data in A:D

Sub DeleteRowsWithBlankBD()
Dim lLastRow As Long
Dim x As Integer
lLastRow = Range("A65536").End(xlUp).Row
For x = lLastRow To 1 Step -1
If Trim(Range("B" & x)) & Trim(Range("C" & x)) & Trim(Range("D" & x)) = ""
Then
Range("A" & x).EntireRow.Delete
End If
Next x
End Sub


--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Slohcin" wrote in message
...
Nick,
Did it with space " ", is this the best way?
I would like to run this as a macro, is this possible?
--
Thanks
Slohcin


"Nick Hodge" wrote:

Slohcin

Glad it works. Did you handle the space " " or did you put a TRIM around
each reference

=IF(AND(TRIM(B1)=""............

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Slohcin" wrote in message
...
Nick,
Thanks for your help. It appears that columns B,C & D are not blank but
contain a space. I have amended your original formula to cater for this
and
it now works.
--
Thanks
Slohcin


"Nick Hodge" wrote:

Slohcin

Then the formula should work.

Can you set up helper columns to return the contents of cells in
columns
B,
C &D thus

=ISBLANK(B1)
=ISBLANK(C1)
=ISBLANK(D1)

and copy down

Where a cell is 'thought' by eye to be empty you should get TRUE. If
you
get
TRUE in any row in B, C & D the formula using that same row should put
an
x
in the cell to sort on

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Slohcin" wrote in message
...
Nick,
Column A will always have an entry. As I tried to illustrate in my
example,
Columns B,C+D may or may not have an entry. I am looking to delete
any
row
where B,C +D are empty/blank. There are no formulas used.
--
Thanks
Slohcin


"Nick Hodge" wrote:

Slohcin

That's what happen here. Are you sure A,B and C are empty? No
formula,
or
similar?

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Slohcin" wrote in message
...
Nick,
Thanks for your reply.
I have tried what you suggested, but nothing happens. I was
expecting
an
"x"
in column E, but get nothing. What am I doing wrong?
--
Thanks
Slohcin


"Nick Hodge" wrote:

Slohcin

I would set up a helper column in E and enter

=IF(AND(B1="",C1="",D1=""),"x","")

Then copy down and sort on that column and delete all the rows
with
an x
in

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Slohcin" wrote in message
...
I need to delete rows when certain columns have empty cells.
ColA ColB ColC ColD
data y y
data
data y y
data y y y

What I need to do is delete row2 because columns B,C & D are
empty.

How can I do this?
--
Thanks
Slohcin








  #14   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default delete rows with empty cells

I guess you didn't see my post?

--
Don Guillett
SalesAid Software

"Slohcin" wrote in message
...
Nick,
Did it with space " ", is this the best way?
I would like to run this as a macro, is this possible?
--
Thanks
Slohcin


"Nick Hodge" wrote:

Slohcin

Glad it works. Did you handle the space " " or did you put a TRIM around
each reference

=IF(AND(TRIM(B1)=""............

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Slohcin" wrote in message
...
Nick,
Thanks for your help. It appears that columns B,C & D are not blank but
contain a space. I have amended your original formula to cater for this
and
it now works.
--
Thanks
Slohcin


"Nick Hodge" wrote:

Slohcin

Then the formula should work.

Can you set up helper columns to return the contents of cells in
columns
B,
C &D thus

=ISBLANK(B1)
=ISBLANK(C1)
=ISBLANK(D1)

and copy down

Where a cell is 'thought' by eye to be empty you should get TRUE. If
you
get
TRUE in any row in B, C & D the formula using that same row should put
an
x
in the cell to sort on

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Slohcin" wrote in message
...
Nick,
Column A will always have an entry. As I tried to illustrate in my
example,
Columns B,C+D may or may not have an entry. I am looking to delete
any
row
where B,C +D are empty/blank. There are no formulas used.
--
Thanks
Slohcin


"Nick Hodge" wrote:

Slohcin

That's what happen here. Are you sure A,B and C are empty? No
formula,
or
similar?

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Slohcin" wrote in message
...
Nick,
Thanks for your reply.
I have tried what you suggested, but nothing happens. I was
expecting
an
"x"
in column E, but get nothing. What am I doing wrong?
--
Thanks
Slohcin


"Nick Hodge" wrote:

Slohcin

I would set up a helper column in E and enter

=IF(AND(B1="",C1="",D1=""),"x","")

Then copy down and sort on that column and delete all the rows
with
an x
in

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Slohcin" wrote in message
...
I need to delete rows when certain columns have empty cells.
ColA ColB ColC ColD
data y y
data
data y y
data y y y

What I need to do is delete row2 because columns B,C & D are
empty.

How can I do this?
--
Thanks
Slohcin









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
delete empty rows in workbook TooN Excel Worksheet Functions 1 August 10th 06 11:22 AM
How to count blank cells (Rows) between Non-Blank cells in Col "A" Dennis Excel Discussion (Misc queries) 8 July 20th 06 11:25 PM
resetting last cell jagdish.eashwar Excel Discussion (Misc queries) 11 March 31st 06 02:06 AM
Counting empty cells within a range of cells Rosehill - ExcelForums.com New Users to Excel 2 May 2nd 05 08:53 AM
Macro to hide rows with empty cells tp58tp Excel Worksheet Functions 2 November 13th 04 02:01 PM


All times are GMT +1. The time now is 01:57 AM.

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"