Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9248901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:03:40+00:00 2026-06-18T10:03:40+00:00

I have a request for how I might go about the following operation: I

  • 0

I have a request for how I might go about the following operation:

I have a csv file (that I’m opening in Excel) that I am appending a block of data 50X2 (rowsXcolumns) to the csv file. With the finished csv file, I would like to automate a process where every 50 rows get selected (both columns) and the data essentially gets cut and copied to the next two available columns.

An example would be data from $A$1:$B$50 is in the csv and then a second sample is taken and the second set of data goes to $A$51:$B$100 and I would like to automatically move the second set to $C$1:$D$50 and perform that move for all samples taken.

I don’t know what the best route for this operation would be (macro/VBA/etc) and would like some assistance with this, if it is easily possible.

Thank you all for your time and help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T10:03:42+00:00Added an answer on June 18, 2026 at 10:03 am

    The basic idea behind what needs to be done is:

    • Get the number of new columns to make (e.g. Total Rows/#rows per column)
    • For each new column to make, cut from the nth + 1 row to the last row, where nth row is the number of rows per column that you want (in your case, 50).
    • Paste the cut rows to the right of the last column that has data in it
    • Repeat until all columns have been made

    Here is some sample code that I put together to get you started. This assumes your data starts in cell A1, and that each column should contain a maxium of 10 rows. You can change the rowsToSkip value to meet your needs. Also, please note that this is meant to get you started and requires more testing. Alter it as you see fit:

    Public Sub MakeColumnsFromRows()
        Dim totalCutsToMake As Integer
        Dim currentColumn As Integer
        Dim currentCut As Integer
        Dim rowsToCut As Integer
    
        Sheets(1).Activate
        rowsToSkip = 10
        totalCutsToMake = (ActiveSheet.UsedRange.Rows.Count / rowsToSkip)
        currentColumn = 1
    
        Dim RowCount As Integer
        For currentCut = 1 To totalCutsToMake
            RowCount = Cells(Rows.Count, currentColumn).End(xlUp).Row
            Range(Cells(rowsToSkip + 1, currentColumn), Cells(RowCount, currentColumn + 1)).Select
            Selection.Cut
            Cells(1, currentColumn + 2).Select
            ActiveSheet.Paste
            currentColumn = currentColumn + 2
        Next
    End Sub
    

    What this does is it first finds out how many new columns to make, then it cuts from the 11th row in each column down to the last row, then pastes those values after the last column that contains data. It does this until all new columns have been made. Please note that this leaves 10 rows of data per column. To change this to 50 you just need to change the rowsToSkip variable to 50.

    Here is the before and after screenshots:

    BEFORE
    enter image description here

    AFTER
    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a request that returns a large xml file. I have the file
I have 100 web servers and noticed that some of them have request filtering
I have a request controller that is getting out of hand, and I want
I have a request in from a client that would like one of their
I have ajax request that do 3 missions: Save Model (DB) Send Email Give
I have a large photo that I am trying to upload and after about
Back story i have a table that stores cached times, and currently has about
I have a file that I don't want to be accessed by anyone except
Suppose I have the following (rather common) model Client invokes web service request ->
I have a htaccess file that it work perfectly on host but when I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.