How to pastes row of data into another sheet while removing blank lines?

Mattyastill

New Member
Joined
Nov 27, 2017
Messages
23
Hi,

I've used conditional formatting on a large set of data to highlight a specific criteria. I have then got formula which gets the highlighted rows into a separate table but the gaps are still there. I was wondering if i was possible to use formula to paste in the rows into another sheet but get rids of the blank lines.

I will be continually posting new sets of data and into the master template i've made to highlight certain areas. Having the ability to copy and paste the dataset and it automatically display the Rows from the conditional formatting on a new sheet would be great.

Any help would be greatly appreciated.

Thanks.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Not aware of any way to do it with a formula, but you could use a macro like the following;

Code:
Sub DelRows()Dim i As Long, LastRow As Long
Application.ScreenUpdating = False
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
For i = LastRow To 1 Step -1 'last row of data in column A to 1
If Cells(i, 1) = "" Then Cells(i, 1).EntireRow.Delete 'if A+row num is blank then delete row
Next i
Application.ScreenUpdating = True
MsgBox "Blank rows deleted"
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,557
Members
449,088
Latest member
davidcom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top