Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Place value from list into specific cells
Hello. I have a list of 270 items with related info. I know how to make the
names from the list create and populate the tab names, and then put the names of the tabs in a specific cell, but I'd like to put a couple of other pieces of information from the list in there also. How would I tell Excel for instance to take everything from column C (except the header, although I can delete that if necessary) and place it in cell C47 on each worksheet? By that I mean what's in cell C2 on the list to cell C47 on the first worksheet, what's in cell C3 on the list to cell C47 on the second worksheet, and so on. I appreciate any help. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200811/1 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Place value from list into specific cells
It is always useful to post any code you have. As for your request, there is
a problem with it... your destination cells overlaps your source cells on at least one of the sheets. In any event, this macro code should point you in the right direction (just change the Const statements to match your actual conditions)... Sub DistributeColumnData() Dim X As Long Dim LastRow As Long Const FirstRow As Long = 2 Const SourceColumn As String = "C" Const DestinationCell As String = "C47" Const SourceSheetName As String = "Sheet1" With Worksheets(SourceSheetName) LastRow = .Cells(.Rows.Count, SourceColumn).End(xlUp).Row For X = FirstRow To LastRow Worksheets(X - 1).Range(DestinationCell).Value = _ .Cells(X, SourceColumn).Value Next End With End Sub -- Rick (MVP - Excel) "Joe_Hunt via OfficeKB.com" <u45578@uwe wrote in message news:8ca62c082619c@uwe... Hello. I have a list of 270 items with related info. I know how to make the names from the list create and populate the tab names, and then put the names of the tabs in a specific cell, but I'd like to put a couple of other pieces of information from the list in there also. How would I tell Excel for instance to take everything from column C (except the header, although I can delete that if necessary) and place it in cell C47 on each worksheet? By that I mean what's in cell C2 on the list to cell C47 on the first worksheet, what's in cell C3 on the list to cell C47 on the second worksheet, and so on. I appreciate any help. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200811/1 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Place value from list into specific cells
That's perfect! Thanks!
Rick Rothstein wrote: It is always useful to post any code you have. As for your request, there is a problem with it... your destination cells overlaps your source cells on at least one of the sheets. In any event, this macro code should point you in the right direction (just change the Const statements to match your actual conditions)... Sub DistributeColumnData() Dim X As Long Dim LastRow As Long Const FirstRow As Long = 2 Const SourceColumn As String = "C" Const DestinationCell As String = "C47" Const SourceSheetName As String = "Sheet1" With Worksheets(SourceSheetName) LastRow = .Cells(.Rows.Count, SourceColumn).End(xlUp).Row For X = FirstRow To LastRow Worksheets(X - 1).Range(DestinationCell).Value = _ .Cells(X, SourceColumn).Value Next End With End Sub Hello. I have a list of 270 items with related info. I know how to make the [quoted text clipped - 11 lines] on. I appreciate any help. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200811/1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Formula to place the same value in a specific number of cells | Excel Worksheet Functions | |||
how do i sort a list from cells by picking a specific letter? | Excel Discussion (Misc queries) | |||
Write cells fro one file to a specific place in another | Excel Programming | |||
Place Subform data into specific cells | Excel Programming | |||
Place Subform data onto specific cells | Excel Programming |