+ Reply to Thread
Results 1 to 7 of 7

spit_data in all sheets

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    09-21-2012
    Location
    greece,athens
    MS-Off Ver
    Excel professional plus 2016
    Posts
    157

    spit_data in all sheets

    Hallo again.
    i have a problem and i need your help .Please!
    open the sheet, i explain there my problem.
    sorry but my eglish is not so good.please forgive me.
    Attached Files Attached Files
    Power! is knowledge...............

  2. #2
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: spit_data in all sheets

    Will there always only be 8 sheets?

  3. #3
    Forum Contributor
    Join Date
    09-21-2012
    Location
    greece,athens
    MS-Off Ver
    Excel professional plus 2016
    Posts
    157
    Quote Originally Posted by maniacb View Post
    Will there always only be 8 sheets?
    Yes always 8 sheets.thank you

  4. #4
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: spit_data in all sheets

    Try

    Option Explicit
    
    Sub arrange()
    Dim x, lr, y, k, g As Long
    
    k = 2
    lr = Cells(Rows.Count, 1).End(xlUp).Row 'last row col A
    x = (lr - 1) / 8
    
    With Sheet1
        For g = 1 To x
            Do While Cells(k, 1).Value = g
                For y = 1 To 8
                    Sheets(y + 1).Range("B" & 10 + g) = Sheet1.Cells(k, 4)
                    Sheets(y + 1).Range("C" & 10 + g) = Sheet1.Cells(k, 5)
                    k = k + 1
                Next y
            Loop
            
        Next g
    End With
    
    End Sub
    Attached Files Attached Files
    Last edited by maniacb; 09-21-2020 at 06:20 PM. Reason: Corrections to response

  5. #5
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,550

    Re: spit_data in all sheets

    See attached

    Sub Maybe()
    Dim c As Range
        For Each c In Range("A2:A" & Cells(Rows.Count, 1).End(xlUp).Row)
            Sheets("" & c.Value & "").Cells(Sheets("" & c.Value & "").Rows.Count, 2).End(xlUp).Offset(1).Resize(, 2).Value = c.Offset(, 3).Resize(, 2).Value
        Next c
    End Sub
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: spit_data in all sheets

    or

    Sub VenA()
      ar = Sheet1.Cells(1).CurrentRegion
      For j = 2 To UBound(ar)
        With Sheets(CStr(IIf((j - 1) Mod 8 = 0, 8, (j - 1) Mod 8)))
          .Cells(Application.Max(11, .Cells(Rows.Count, 2).End(xlUp).Row + 1), 2).Resize(, 2) = Array(ar(j, 4), ar(j, 5))
        End With
      Next j
    End Sub

  7. #7
    Forum Contributor
    Join Date
    09-21-2012
    Location
    greece,athens
    MS-Off Ver
    Excel professional plus 2016
    Posts
    157

    Re: spit_data in all sheets

    Thank you all so much.That was exactly want i needed.THANK YOU

+ 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] Codes for Prevent users from adding sheets, deleting sheets, hiding/unhiding sheets
    By geniusufo007 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-13-2017, 11:57 PM
  2. [SOLVED] Copy Paste From Rawdata Sheets to Multiple Sheets Based on Sheet names
    By farrukh in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-16-2017, 11:01 PM
  3. Compare Sheets and Display the previous sheets column in current sheets
    By maddyrafi1987 in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 05-09-2017, 04:03 AM
  4. Create New Sheets, Copy New Sheets & Name New Sheets - §8-O
    By Gtrtim112 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-26-2016, 10:58 PM
  5. Programming code : Sheets.Add After:=Sheets(Sheets.Count)
    By Blok , Robert in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-17-2015, 05:00 AM
  6. Replies: 17
    Last Post: 02-01-2013, 12:20 PM
  7. Replies: 2
    Last Post: 01-18-2012, 05:08 AM

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