+ Reply to Thread
Results 1 to 3 of 3

Help in VBA to show title row in all sheet neither then one (split data)

  1. #1
    Forum Contributor
    Join Date
    08-04-2016
    Location
    pakistan
    MS-Off Ver
    2010
    Posts
    225

    Post Help in VBA to show title row in all sheet neither then one (split data)

    hello all
    i need little change in below VBA that when i run macro,the header is showing only first sheet and i want header in all sheets which i splitted..sorry for i do not know to show below VBA in that way where all gurus mention


    Sub SplitData()
    'Updateby20140617
    Dim WorkRng As Range
    Dim xRow As Range
    Dim SplitRow As Integer
    Dim xWs As Worksheet
    On Error Resume Next
    xTitleId = "KutoolsforExcel"
    Set WorkRng = Application.Selection
    Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
    SplitRow = Application.InputBox("Split Row Num", xTitleId, 5, Type:=1)
    Set xWs = WorkRng.Parent
    Set xRow = WorkRng.Rows(1)
    Application.ScreenUpdating = False
    For i = 1 To WorkRng.Rows.Count Step SplitRow
    resizeCount = SplitRow
    If (WorkRng.Rows.Count - xRow.Row + 1) < SplitRow Then resizeCount = WorkRng.Rows.Count - xRow.Row + 1
    xRow.Resize(resizeCount).Copy
    Application.Worksheets.Add after:=Application.Worksheets(Application.Worksheets.Count)
    Application.ActiveSheet.Range("A1").PasteSpecial
    Set xRow = xRow.Offset(SplitRow)
    Next
    Application.CutCopyMode = False
    Application.ScreenUpdating = True
    End Sub
    Last edited by adeel1; 10-27-2016 at 11:31 AM.

  2. #2
    Forum Contributor
    Join Date
    08-04-2016
    Location
    pakistan
    MS-Off Ver
    2010
    Posts
    225

    Help in VBA to show title row in all sheet neither then one (split data)

    please any one..??
    Last edited by adeel1; 10-27-2016 at 05:05 AM.

  3. #3
    Forum Contributor
    Join Date
    08-04-2016
    Location
    pakistan
    MS-Off Ver
    2010
    Posts
    225

    Re: Help in VBA to show title row in all sheet neither then one (split data)


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Copy data from Main sheet to target sheets according to row header and target sheet header
    By realrookie in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-31-2016, 07:26 AM
  2. Making a report and show data from matrix with header & data
    By jhonneyboy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-07-2014, 03:35 AM
  3. Copy data from header to header in consolidation sheet
    By Ignesh in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-12-2013, 04:10 AM
  4. Header, Length, Split, New Sheet
    By ssakthish in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-16-2013, 09:13 PM
  5. How: Show Value of Header Row if there is any Value in the Data Row?
    By bmasella in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-12-2011, 10:48 AM
  6. Replies: 2
    Last Post: 01-25-2006, 06:10 PM
  7. Change Header data
    By MrMountain in forum Excel General
    Replies: 1
    Last Post: 01-21-2006, 04:34 PM

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