Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
automatically appending newly added data on worksheet to a master list worksheet | Links and Linking in Excel | |||
Copy and pasting specific sheet data to a master worksheet | Excel Programming | |||
copy range on every worksheet (diff names) to a master worksheet (to be created) | Excel Programming | |||
copy range on every worksheet (diff names) to a master worksheet (to be created) | Excel Programming | |||
Copy ranges of data from Master worksheet. Thanks | Excel Programming |