fix basic macro to filter blank data

  • Thread starter Thread starter scaredycat
  • Start date Start date
S

scaredycat

Hi all,

I have 2 basic macros using the active cell one returns the entire row onto
a new sheet and one returns the entire column onto a new sheet. i'm using
the autofilter function for this.

what i want to do is edit this code so that only non-blank data is returned,
i.e delete empty colums. what is the best way of doing this?
 
Hi all,

I have 2 basic macros using the active cell one returns the entire row onto
a new sheet and one returns the entire column onto a new sheet.  i'm using
the autofilter function for this.

what i want to do is edit this code so that only non-blank data is returned,
i.e delete empty colums.  what is the best way of doing this?

Hi

Show us the code you have got so far.

Regards,
Per
 
Sorry i'm having issues now i just lost everything but heres some code that
someone helped me with before:

With Worksheets("Sheet2")

Worksheets("Sheet1").Columns(1).Copy _
destination:=.Range("A1")
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For i = LastRow To 2 Step -1
If .Cells(i, "A").Value = "" Then
.Rows(i).Delete
End If
Next i

I need to modify this now, since my memory stick has died (grrr), to work
for the activecell row or active cell column to return just the non blank
data. this means removing column headers for columns that don't contain data.

Thank you, i'm having a horrid night please help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top