ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do i distribute columns of data to separate sheets? (https://www.excelbanter.com/excel-worksheet-functions/139109-how-do-i-distribute-columns-data-separate-sheets.html)

beselfish

How do i distribute columns of data to separate sheets?
 
I have a budget set up for the year. Each column represents one month and
all budget categories are the same for the year (represented by rows). I
want to distribute each column to it's own worksheet with as little
copy/paste activity as possible. Any ideas?

Gary''s Student

How do i distribute columns of data to separate sheets?
 
Let's start out with a single worksheet called "yearly". Run this macro:

Sub month_ize()
s = Array("jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep",
"oct", "nov", "dec")
For I = 0 To 11
Sheets("yearly").Activate
Set r1 = Range(Cells(1, I + 1), Cells(Rows.Count, I + 1))
Worksheets.Add
ActiveSheet.Name = s(I)
Set r2 = Range("A1")
r1.Copy r2
Next
End Sub


It will create the monthly tabs for you and copy the appropriate columns for
you.
--
Gary''s Student - gsnu200715


"beselfish" wrote:

I have a budget set up for the year. Each column represents one month and
all budget categories are the same for the year (represented by rows). I
want to distribute each column to it's own worksheet with as little
copy/paste activity as possible. Any ideas?



All times are GMT +1. The time now is 07:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com