ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how to link data from one source sheet to multiple sheets (https://www.excelbanter.com/excel-worksheet-functions/146611-how-link-data-one-source-sheet-multiple-sheets.html)

Ashish Deshmukh

how to link data from one source sheet to multiple sheets
 
I have data in 1st Sheet with column labels: Account No, Name & Amount. It
consisits of data of 20 rows for 20 different accounts.
I want to generate 20 worksheets in the same file each of which will pick
the data from sheet 1. Each new generated sheet will pick the data from sheet
1 to a specified cell. (means i would like to have account no of row 1 at C-5
of new sheet, account no of row 2 at C-5 of other new sheet. Can anybody
please suggest can it be automated?
Thanks in advance.

ShaneDevenshire

how to link data from one source sheet to multiple sheets
 
Hi,

You will need to automate this with VBA: For example, if your data starts
on row 2 and goes to row 29 on Sheet1 and the titles are in cells A1:C1, then
something like this will work. You can enhance the flexibility by having the
code determine how many rows but that depends on you data layout - are there
missing items in some cells, are there totals at the bottom of columns, is
there other data below the data...

Sub CopyData()
For I = 2 To 21
Sheets.Add
Range("C5:E5") = Sheets("sheet1").Range("A" & I & ":C" & I).Value
Next I
End Sub
--
Cheers,
Shane Devenshire


"Ashish Deshmukh" wrote:

I have data in 1st Sheet with column labels: Account No, Name & Amount. It
consisits of data of 20 rows for 20 different accounts.
I want to generate 20 worksheets in the same file each of which will pick
the data from sheet 1. Each new generated sheet will pick the data from sheet
1 to a specified cell. (means i would like to have account no of row 1 at C-5
of new sheet, account no of row 2 at C-5 of other new sheet. Can anybody
please suggest can it be automated?
Thanks in advance.


Ashish Deshmukh[_2_]

how to link data from one source sheet to multiple sheets
 
Hello Shane, Thank you very much.
I do not VB but I will try this and get back to you again.
Once again thanks.


"ShaneDevenshire" wrote:

Hi,

You will need to automate this with VBA: For example, if your data starts
on row 2 and goes to row 29 on Sheet1 and the titles are in cells A1:C1, then
something like this will work. You can enhance the flexibility by having the
code determine how many rows but that depends on you data layout - are there
missing items in some cells, are there totals at the bottom of columns, is
there other data below the data...

Sub CopyData()
For I = 2 To 21
Sheets.Add
Range("C5:E5") = Sheets("sheet1").Range("A" & I & ":C" & I).Value
Next I
End Sub
--
Cheers,
Shane Devenshire


"Ashish Deshmukh" wrote:

I have data in 1st Sheet with column labels: Account No, Name & Amount. It
consisits of data of 20 rows for 20 different accounts.
I want to generate 20 worksheets in the same file each of which will pick
the data from sheet 1. Each new generated sheet will pick the data from sheet
1 to a specified cell. (means i would like to have account no of row 1 at C-5
of new sheet, account no of row 2 at C-5 of other new sheet. Can anybody
please suggest can it be automated?
Thanks in advance.



All times are GMT +1. The time now is 10:29 PM.

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