• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Find the blank cell just after column header, after applying filter

AmitSingh

Member
Hi,

Need help to find the blank cell just after the column header after applying filter in Column I of LOB column by choosing the criteria "Product Line"

Query:- Find the blank cell just after the Header column after applying filter

Condition 1:- If blank cell found, column K of Customer Specific Tower / Product,
then only header should be copied in another worksheet.

Condition 2:- If data found, column K of Customer Specific Tower / Product,
then along with header, data will be pasted in another worksheet.

I have tried below code, after applying filter, data is not pick if cell is blank.

Code:
Sub pasteblankcell()
   
    Range("K13").Select
    Selection.AutoFilter
    ActiveSheet.Range("$B$13:$BC$44").AutoFilter Field:=8, Criteria1:="Product Line"
    Range("K13").Select
    If IsEmpty(Range("K14")) = "" Then
      Range("K13").Select
      Selection.Copy
      Workbooks.Add
      Range("D3").Select
      Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
    Else
        Range("K13").Select
        Range(Selection, Selection.End(xlDown)).Select
        Selection.Copy
        Workbooks.Add
        Range("D3").Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
        Range("G22").Select
        Windows("Volkswagon.xlsb").Activate
    End If

End Sub

I have also attached the workbook for your reference.

Any help is appreciated as this little urgent. Thanks in advance.

Thank you!!

Warm Regards,
Amit Singh
 

Attachments

  • Volkswagon.xlsb
    293.4 KB · Views: 2
Back
Top