Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Add to sheet


I have a list of client names on a sheet called client names, I hav
another sheet that I use to track time on I only want to create a cod
on the time tracking sheet that will look on the client name sheet in
column A and B from row 12 to row 42 and then place those names i
column B row 10 - 51 of itself (track time sheet).

I know that on the client name sheet the client name is broken betwee
column A and B, however I would like for it to just place a comm
between the two in column B of the time track worksheet.

Than

--
oberon.blac
-----------------------------------------------------------------------
oberon.black's Profile: http://www.excelforum.com/member.php...fo&userid=2673
View this thread: http://www.excelforum.com/showthread.php?threadid=46645

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Add to sheet

The following code is one approach to this type of copy/merge/paste
operation. I would recommend using range names rather than specific cell
references. The code inserts a new column in the TimeSheet worksheet to
accommodate the two columns of data from the ClientNames worksheet. It then
merges the two columns, inserting a comma between the values. Finally, the
newly inserted column is deleted.

Sub CopyClientNames()
Dim i As Integer

Worksheets("TimeSheet").Activate
Range("C:C").Columns.Insert xlShiftToRight

Worksheets("ClientNames").Activate
Range("A12:B42").Copy

Worksheets("TimeSheet").Activate
Range("B10:B51").PasteSpecial xlPasteAll

Range("B10").Select
For i = 0 To Range("B10", "B51").Rows.Count - 1
If ActiveCell.Value < "" Then
ActiveCell.Value = ActiveCell.Value & "," & ActiveCell.Offset(0,
1).Value
End If
ActiveCell.Offset(1, 0).Select
Next i

Range("C:C").Columns.Delete xlShiftToLeft

Cells(1, 1).Select

End Sub

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


"oberon.black"
wrote in message
news:oberon.black.1v4eub_1126317918.3921@excelforu m-nospam.com...

I have a list of client names on a sheet called client names, I have
another sheet that I use to track time on I only want to create a code
on the time tracking sheet that will look on the client name sheet in
column A and B from row 12 to row 42 and then place those names in
column B row 10 - 51 of itself (track time sheet).

I know that on the client name sheet the client name is broken between
column A and B, however I would like for it to just place a comma
between the two in column B of the time track worksheet.

Thanx


--
oberon.black
------------------------------------------------------------------------
oberon.black's Profile:
http://www.excelforum.com/member.php...o&userid=26732
View this thread: http://www.excelforum.com/showthread...hreadid=466456


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Add to sheet


i added this code to the time tracking sheet and it was a dud.

please advic

--
oberon.blac
-----------------------------------------------------------------------
oberon.black's Profile: http://www.excelforum.com/member.php...fo&userid=2673
View this thread: http://www.excelforum.com/showthread.php?threadid=46645

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
excel sheet bootom half sheet goes behind top part of sheet rob Excel Worksheet Functions 2 January 17th 09 01:28 AM
Duplicate sheet, autonumber sheet, record data on another sheet des-sa[_2_] Excel Worksheet Functions 0 May 8th 08 06:56 PM
How do I select price from sheet.b where sheet.a part no = sheet.b Sonny Excel Worksheet Functions 4 April 4th 06 05:08 PM
relative sheet references ala sheet(-1)!B11 so I can copy a sheet. RonMc5 Excel Discussion (Misc queries) 9 February 3rd 05 12:51 AM
Inserting a row in sheet A should Insert a row in sheet B, removing a row in Sheet A should remove the corresponding row in sheet B Hannes Heckner Excel Programming 1 March 5th 04 09:10 AM


All times are GMT +1. The time now is 11:08 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"