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

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
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,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

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