The Code Cage - Microsoft Office help Free Microsoft Office Help for all Applications!  

To stop seeing these ads and get other benefits check This page!

Go Back   The Code Cage Forums > Newsgroups - Microsoft Topics > Newsgroup - Excel Forum > Worksheet Functions


Worksheet Functions Post questions in this forum if they are related to using Microsoft Excel Worksheet Functions, e.g Forumale or built in functionality etc.

Hey there!

It looks like you're enjoying but haven't created an account yet. Why not take a minute to register for your own free account now? As a member you get free access to all of our forums and posts plus the ability to post your own messages, communicate directly with other members and much more. Register now!

Already a member? Login at the top of this page to stop seeing this message.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 22nd June 2009, 08:22 AM
Junior Member
MS Office Version: MS Office 2003
MS Office Skill Level: New to Excel


My Top Tip Count: 0

 
Join Date: Mar 2009
Location: New Delhi
Age: 35
Posts: 23
Thanks to others: 1
Thanked 1 Time in 1 Post
Chats: 0
Rep Power: 1
hardeep.kanwar is on a distinguished road
India
Default Delet Duplicate Blanks rows

------ Register to get rid of these "In Post" ads! ------


Hi! to Everyone

There are many Software and Addin and Macro or Code to Delete or Eliminate the Duplicate Data

But, I want to Delete The Duplicate BLANKS Row.I means to Say that Delete Every Repeated Blank row

Example
'Original Source: The Code Cage Forums http://www.thecodecage.com/forumz/worksheet-functions/108814-delet-duplicate-blanks-rows.html#post389243

Hardeep
Blank
Renu
Blank
Blank
ABc
Blank
DEF
Blank
Blank
Blank
Now i Want in this format

Hardeep
Blank
Renu
Blank
ABC
Blank
DEF
Blank
and so on,


Thanks in Advance

Hardeep Kanwar
Reply to this post


Did you find this post helpful? Yes | No

The Code Cage Advertisment
Advertisement

To stop seeing these ads and get other benefits check This page!
  #2 (permalink)  
Old 22nd June 2009, 08:37 AM
Jacob Skaria
Newsgroup Contributor


My Top Tip Count:

 
Posts: n/a
Chats:
Default RE: Delet Duplicate Blanks rows

------ Register to get rid of these "In Post" ads! ------


Hi Hardeep

Try the below and feedback...

Sub DeleteBlankRows()
Dim lngRow As Long
Dim intBlank As Integer
For lngRow = Cells(Rows.Count, 1).End(xlUp).Row To 1 Step -1
'Hide rows with blanks
If WorksheetFunction.CountBlank(Rows(lngRow)) = Columns.Count Then
'Original Source: The Code Cage Forums http://www.thecodecage.com/forumz/worksheet-functions/108814-delet-duplicate-blanks-rows.html#post389255
intBlank = intBlank + 1
Else
intBlank = 0
End If
If intBlank = 2 Then Rows(lngRow).Delete: intBlank = 1
Next
End Sub

--
If this post helps click Yes
---------------
Jacob Skaria


"hardeep.kanwar" wrote:

>
> Hi! to Everyone
>
> There are many Software and Addin and Macro or Code to Delete or
> Eliminate the Duplicate Data
>
> But, I want to Delete The Duplicate BLANKS Row.I means to Say that
> Delete Every Repeated Blank row
>
> Example
>
> Hardeep
> Blank
> Renu
> Blank
> Blank
> ABc
> Blank
> DEF
> Blank
> Blank
> Blank
> Now i Want in this format
>
> Hardeep
> Blank
> Renu
> Blank
> ABC
> Blank
> DEF
> Blank
> and so on,
>
>
> Thanks in Advance
>
> Hardeep Kanwar
>
>
> --
> hardeep.kanwar
> ------------------------------------------------------------------------
> hardeep.kanwar's Profile: http://www.thecodecage.com/forumz/members/hardeep-kanwar.html
> View this thread: Delet Duplicate Blanks rows
>
>

Reply to this post


Did you find this post helpful? Yes | No
  #3 (permalink)  
Old 22nd June 2009, 08:40 AM
Mike H
Newsgroup Contributor


My Top Tip Count:

 
Posts: n/a
Chats:
Default RE: Delet Duplicate Blanks rows

------ Register to get rid of these "In Post" ads! ------


Hi,

Right click your sheet tab, view code and paste this in and try it

Sub Blank_Rows()
Dim i As Long
With Application
.Calculation = xlCalculationManual
.ScreenUpdating = False
lastrow = Cells(Rows.Count, "A").End(xlUp).Row
For i = lastrow To 2 Step -1
If WorksheetFunction.CountA(Rows(i)) = 0 And _
WorksheetFunction.CountA(Rows(i).Offset(-1)) = 0 Then
Rows(i).EntireRow.Delete
End If
Next i
.Calculation = xlCalculationAutomatic
.ScreenUpdating = True
End With
End Sub


Mike

"hardeep.kanwar" wrote:

>
> Hi! to Everyone
>
> There are many Software and Addin and Macro or Code to Delete or
'Original Source: The Code Cage Forums http://www.thecodecage.com/forumz/worksheet-functions/108814-delet-duplicate-blanks-rows.html#post389256
> Eliminate the Duplicate Data
>
> But, I want to Delete The Duplicate BLANKS Row.I means to Say that
> Delete Every Repeated Blank row
>
> Example
>
> Hardeep
> Blank
> Renu
> Blank
> Blank
> ABc
> Blank
> DEF
> Blank
> Blank
> Blank
> Now i Want in this format
>
> Hardeep
> Blank
> Renu
> Blank
> ABC
> Blank
> DEF
> Blank
> and so on,
>
>
> Thanks in Advance
>
> Hardeep Kanwar
>
>
> --
> hardeep.kanwar
> ------------------------------------------------------------------------
> hardeep.kanwar's Profile: http://www.thecodecage.com/forumz/members/hardeep-kanwar.html
> View this thread: Delet Duplicate Blanks rows
>
>

Reply to this post


Did you find this post helpful? Yes | No
The Code Cage Advertisment
Advertisement

To stop seeing these ads and get other benefits check This page!
  #4 (permalink)  
Old 22nd June 2009, 08:51 AM
Junior Member
MS Office Version: MS Office 2003
MS Office Skill Level: New to Excel


My Top Tip Count: 0

 
Join Date: Mar 2009
Location: New Delhi
Age: 35
Posts: 23
Thanks to others: 1
Thanked 1 Time in 1 Post
Chats: 0
Rep Power: 1
hardeep.kanwar is on a distinguished road
India
Default Re: Delet Duplicate Blanks rows

------ Register to get rid of these "In Post" ads! ------


Wow thanks Jacob Skaria & Mike H

Both Works Perfectly

Is this Possible With Formula

Thanks Again
Reply to this post


Did you find this post helpful? Yes | No
  #5 (permalink)  
Old 22nd June 2009, 09:49 AM
Mike H
Newsgroup Contributor


My Top Tip Count:

 
Posts: n/a
Chats:
Default Re: Delet Duplicate Blanks rows

------ Register to get rid of these "In Post" ads! ------


Thanks for the feedback

> Is this Possible With Formula


No.

Mike

"hardeep.kanwar" wrote:

>
> Wow thanks Jacob Skaria & Mike H
>
> Both Works Perfectly
>
> Is this Possible With Formula
>
> Thanks Again
>
>
> --
> hardeep.kanwar
> ------------------------------------------------------------------------
> hardeep.kanwar's Profile: http://www.thecodecage.com/forumz/members/hardeep-kanwar.html
'Original Source: The Code Cage Forums http://www.thecodecage.com/forumz/worksheet-functions/108814-delet-duplicate-blanks-rows.html#post389295
> View this thread: Delet Duplicate Blanks rows
>
>

Reply to this post


Did you find this post helpful? Yes | No
  #6 (permalink)  
Old 22nd June 2009, 09:51 AM
Junior Member
MS Office Version: MS Office 2003
MS Office Skill Level: New to Excel


My Top Tip Count: 0

 
Join Date: Mar 2009
Location: New Delhi
Age: 35
Posts: 23
Thanks to others: 1
Thanked 1 Time in 1 Post
Chats: 0
Rep Power: 1
hardeep.kanwar is on a distinguished road
India
Default Re: Delet Duplicate Blanks rows

------ Register to get rid of these "In Post" ads! ------


Quote:
Originally Posted by Mike H View Post
Thanks for the feedback

> Is this Possible With Formula


No.

Mike

"hardeep.kanwar" wrote:

>
> Wow thanks Jacob Skaria & Mike H
>
> Both Works Perfectly
>
> Is this Possible With Formula
>
> Thanks Again
>
>
> --
> hardeep.kanwar
> ------------------------------------------------------------------------
> hardeep.kanwar's Profile: The Code Cage Forums - View Profile: hardeep.kanwar
> View this thread: Delet Duplicate Blanks rows - The Code Cage Forums
>
>

Is This Possible With Formula or any Functions
Reply to this post


Did you find this post helpful? Yes | No
The Code Cage Advertisment
Advertisement

To stop seeing these ads and get other benefits check This page!
  #7 (permalink)  
Old 22nd June 2009, 01:21 PM
Ashish Mathur
Newsgroup Contributor


My Top Tip Count:

 
Posts: n/a
Chats:
Default Re: Delet Duplicate Blanks rows

------ Register to get rid of these "In Post" ads! ------


Hi,

You can try this. Assume that the data is in range C3:C11. In cell D3, use
the following formula and copy down till D11:

=IF(COUNTIF(D$2:D2,MATCH(LOOKUP(REPT("z",99),C$3:C3),$C$3:$C$11,0))>=2,"a",MATCH(LOOKUP(REPT("z",99),C$3:C3),$C$3:$C$11,0)).

This will show "a" against all cases where blank rows are more than 1. Now
select range D3:D11 and press F5 > Special. Under the formulas radio
button, select Text. This will highlight all the "a" values. Simply delete
the rows.

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"hardeep.kanwar" <hardeep.kanwar.3u688p@thecodecage.com> wrote in message
news:hardeep.kanwar.3u688p@thecodecage.com...
>
> Hi! to Everyone
>
> There are many Software and Addin and Macro or Code to Delete or
> Eliminate the Duplicate Data
>
> But, I want to Delete The Duplicate BLANKS Row.I means to Say that
> Delete Every Repeated Blank row
>
> Example
>
> Hardeep
> Blank
> Renu
> Blank
> Blank
> ABc
> Blank
> DEF
> Blank
> Blank
> Blank
> Now i Want in this format
>
> Hardeep
> Blank
> Renu
> Blank
> ABC
> Blank
> DEF
> Blank
> and so on,
>
>
> Thanks in Advance
>
> Hardeep Kanwar
>
>
> --
> hardeep.kanwar
> ------------------------------------------------------------------------
> hardeep.kanwar's Profile:
> http://www.thecodecage.com/forumz/members/hardeep-kanwar.html
> View this thread:
'Original Source: The Code Cage Forums http://www.thecodecage.com/forumz/worksheet-functions/108814-delet-duplicate-blanks-rows.html#post389360
> Delet Duplicate Blanks rows
>

Reply to this post


Did you find this post helpful? Yes | No
The Code Cage Advertisment
Advertisement

To stop seeing these ads and get other benefits check This page!
Reply

Bookmarks

Tags
blanks, delet, duplicate, rows


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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

Forum Jump

The Code Cage Affilliates


To stop seeing these ads and get other benefits check This page!



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


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2
No part of this board may be copied or reproduced either in part or full without the express permission of The Code Cage Team.
We are not associated with nor employed by Microsoft in any way, we simply provide resources!
All MS office icons are registered trademarks of the application the represent