Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default copy data from new worksheet to master list

am creating an application that has three master sheets and a template. Sheet
2 holds the data for an unknown list of sheets. I have a userform that allows
the user to copy the template worksheet and give it a unique name. That name
is stored in the database on sheet two. Sheet 2 looks like this.

A B C D
1. Sheet Name Data 1 Data 2 Data 3
2. New Sheet1 NewSheet1!A1 NewSheet1!B1 NewSheet1!C1

I need to figure out how to take data from the new sheet's Cell A1 B1 and C1
and copy it to it's corresponding position on the database in Sheet 2. I hope
that I explained it well. Any help would be appreciated.


--

Fighting Texas Aggie Class of 2009
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 245
Default copy data from new worksheet to master list

I fi read this right you can just reference the cells, no? maybe a Vlookup
function? Have a look here
http://www.contextures.com/xlFunctions02.html

"Texas Aggie" wrote:

am creating an application that has three master sheets and a template. Sheet
2 holds the data for an unknown list of sheets. I have a userform that allows
the user to copy the template worksheet and give it a unique name. That name
is stored in the database on sheet two. Sheet 2 looks like this.

A B C D
1. Sheet Name Data 1 Data 2 Data 3
2. New Sheet1 NewSheet1!A1 NewSheet1!B1 NewSheet1!C1

I need to figure out how to take data from the new sheet's Cell A1 B1 and C1
and copy it to it's corresponding position on the database in Sheet 2. I hope
that I explained it well. Any help would be appreciated.


--

Fighting Texas Aggie Class of 2009

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default copy data from new worksheet to master list

I would use Vlookup if I knew in advance what the sheet name would be
--


Fighting Texas Aggie Class of 2009


"Office_Novice" wrote:

I fi read this right you can just reference the cells, no? maybe a Vlookup
function? Have a look here
http://www.contextures.com/xlFunctions02.html

"Texas Aggie" wrote:

am creating an application that has three master sheets and a template. Sheet
2 holds the data for an unknown list of sheets. I have a userform that allows
the user to copy the template worksheet and give it a unique name. That name
is stored in the database on sheet two. Sheet 2 looks like this.

A B C D
1. Sheet Name Data 1 Data 2 Data 3
2. New Sheet1 NewSheet1!A1 NewSheet1!B1 NewSheet1!C1

I need to figure out how to take data from the new sheet's Cell A1 B1 and C1
and copy it to it's corresponding position on the database in Sheet 2. I hope
that I explained it well. Any help would be appreciated.


--

Fighting Texas Aggie Class of 2009

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default copy data from new worksheet to master list

After doing some more research I come upon the solution to my own problem

The code is:

Sub test()

Dim c As Range
Dim ws As Worksheet
Set ws = ThisWorkbook.Worksheets("Sheet 2")

With ws
For Each c In Application.Intersect(.UsedRange, .Range("A2:A100"))
If c.Value = "" Then

Else
c.Offset(0, 1).Value = "='" & c.Value & "'!A1"
c.Offset(0, 2).Value = "='" & c.Value & "'!B1"


End If
Next c

End With
End Sub
--

Fighting Texas Aggie Class of 2009


"Texas Aggie" wrote:

am creating an application that has three master sheets and a template. Sheet
2 holds the data for an unknown list of sheets. I have a userform that allows
the user to copy the template worksheet and give it a unique name. That name
is stored in the database on sheet two. Sheet 2 looks like this.

A B C D
1. Sheet Name Data 1 Data 2 Data 3
2. New Sheet1 NewSheet1!A1 NewSheet1!B1 NewSheet1!C1

I need to figure out how to take data from the new sheet's Cell A1 B1 and C1
and copy it to it's corresponding position on the database in Sheet 2. I hope
that I explained it well. Any help would be appreciated.


--

Fighting Texas Aggie Class of 2009

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
automatically appending newly added data on worksheet to a master list worksheet tabylee via OfficeKB.com Links and Linking in Excel 0 December 17th 09 04:24 PM
Copy and pasting specific sheet data to a master worksheet simora Excel Programming 4 May 9th 05 05:30 AM
copy range on every worksheet (diff names) to a master worksheet (to be created) Bernie[_2_] Excel Programming 2 September 22nd 04 03:30 PM
copy range on every worksheet (diff names) to a master worksheet (to be created) Bernie[_3_] Excel Programming 0 September 22nd 04 03:26 PM
Copy ranges of data from Master worksheet. Thanks [email protected] Excel Programming 4 November 24th 03 03:28 AM


All times are GMT +1. The time now is 04:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"