Results 1 to 7 of 7

can some one delete the header from this COde

Threaded View

sai0449 can some one delete the... 12-09-2015, 11:26 AM
gmr4evr1 Re: can some one delete the... 12-09-2015, 11:58 AM
sai0449 Re: can some one delete the... 12-09-2015, 12:06 PM
AB33 Re: can some one delete the... 12-09-2015, 12:05 PM
sai0449 Re: can some one delete the... 12-09-2015, 12:09 PM
stnkynts Re: can some one delete the... 12-09-2015, 12:08 PM
gmr4evr1 Re: can some one delete the... 12-09-2015, 12:36 PM
  1. #1
    Registered User
    Join Date
    12-09-2015
    Location
    india
    MS-Off Ver
    2007
    Posts
    22

    Arrow can some one delete the header from this COde

    This code is for spliting of data from a sheet to another sheets based upon a column but it is taking first Row as header and repeated in all sheets so kindly tell which lin i have to delete from this code



    Sub parse_data()
    Dim lr As Long
    Dim ws As Worksheet
    Dim vcol, i As Integer
    Dim icol As Long
    Dim myarr As Variant
    Dim title As String
    Dim titlerow As Integer
    vcol = 1
    Set ws = Sheets("Sheet1")
    lr = ws.Cells(ws.Rows.Count, vcol).End(xlUp).Row
    title = "A1:C1"
    titlerow = ws.Range(title).Cells(1).Row
    icol = ws.Columns.Count
    ws.Cells(1, icol) = "Unique"
    For i = 2 To lr
    On Error Resume Next
    If ws.Cells(i, vcol) <> "" And Application.WorksheetFunction.Match(ws.Cells(i, vcol), ws.Columns(icol), 0) = 0 Then
    ws.Cells(ws.Rows.Count, icol).End(xlUp).Offset(1) = ws.Cells(i, vcol)
    End If
    Next
    myarr = Application.WorksheetFunction.Transpose(ws.Columns(icol).SpecialCells(xlCellTypeConstants))
    ws.Columns(icol).Clear
    For i = 2 To UBound(myarr)
    ws.Range(title).AutoFilter field:=vcol, Criteria1:=myarr(i) & ""
    If Not Evaluate("=ISREF('" & myarr(i) & "'!A1)") Then
    Sheets.Add(after:=Worksheets(Worksheets.Count)).Name = myarr(i) & ""
    Else
    Sheets(myarr(i) & "").Move after:=Worksheets(Worksheets.Count)
    End If
    ws.Range("A" & titlerow & ":A" & lr).EntireRow.Copy Sheets(myarr(i) & "").Range("A1")
    Sheets(myarr(i) & "").Columns.AutoFit
    Next
    ws.AutoFilterMode = False
    ws.Activate
    End Sub
    Last edited by sai0449; 12-09-2015 at 12:11 PM. Reason: solved

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 11-10-2014, 05:48 PM
  2. [SOLVED] Delete Column only after certain Row with Specified Header
    By Pho6 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 09-16-2013, 02:36 PM
  3. Delete column based on header row value
    By dagindi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-31-2011, 02:30 PM
  4. Delete column based on header row value
    By Spider_dude in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-14-2009, 03:01 PM
  5. how to delete header on second page of spreadsheet
    By rcarr_6 in forum Excel General
    Replies: 1
    Last Post: 05-04-2006, 09:40 AM
  6. [SOLVED] How do I delete a header?
    By Amber in forum Excel General
    Replies: 2
    Last Post: 02-20-2006, 10:40 AM
  7. how do you delete a header in Page Setup?
    By sdf in forum Excel General
    Replies: 2
    Last Post: 04-19-2005, 05:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1