Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default 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
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
Formula to place the same value in a specific number of cells flarunner Excel Worksheet Functions 4 May 20th 08 08:56 PM
how do i sort a list from cells by picking a specific letter? abecus Excel Discussion (Misc queries) 2 July 4th 06 02:47 PM
Write cells fro one file to a specific place in another Savvo Excel Programming 0 July 7th 04 11:58 AM
Place Subform data into specific cells pantelis Excel Programming 1 July 23rd 03 02:58 PM
Place Subform data onto specific cells Pantelis Excel Programming 1 July 23rd 03 02:57 PM


All times are GMT +1. The time now is 08:55 PM.

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

About Us

"It's about Microsoft Excel"