View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default 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