PC Review


Reply
Thread Tools Rate Thread

Copy Range / Including Adjacent Cells - into Existing Worksheet.

 
 
loadbuckets@comcast.net
Guest
Posts: n/a
 
      14th Jan 2007
Hello-

Hopefully an easy question but I cannot find an answer and need some
guidance.

All functions occur in same workbook.

I need to find a way with VBA to pull all non-blank cells ( dates )
from column N of worksheet5 along with the number adjacent to it in
column O and paste into column J&K of sheet2 of the same workbook.

Again probably easy but I'm muddling my way through and it's eaten up
most of my night. Any help would be appreciated.

Chuck

 
Reply With Quote
 
 
 
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      14th Jan 2007
To minimize typing I am using sheets named "s2" and "s5":


Sub buckets()
Set s2 = Sheets("s2")
Set s5 = Sheets("s5")

n = s5.Range("N" & Rows.Count).End(xlUp).Row

For i = 1 To n
If IsEmpty(s5.Cells(i, "N")) Then
Else
Set r1 = Range(s5.Cells(i, "N"), s5.Cells(i, "O"))
Set r2 = s2.Cells(i, "J")
r1.Copy r2
End If
Next
End Sub

--
Gary's Student
gsnu200701


"(E-Mail Removed)" wrote:

> Hello-
>
> Hopefully an easy question but I cannot find an answer and need some
> guidance.
>
> All functions occur in same workbook.
>
> I need to find a way with VBA to pull all non-blank cells ( dates )
> from column N of worksheet5 along with the number adjacent to it in
> column O and paste into column J&K of sheet2 of the same workbook.
>
> Again probably easy but I'm muddling my way through and it's eaten up
> most of my night. Any help would be appreciated.
>
> Chuck
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use data fed in adjacent cells to sort and copy the data to spec named range sri_gs Microsoft Excel Discussion 0 12th Apr 2010 02:07 PM
VBA Copy Range of cells with a condition to another worksheet SDS_Feole Microsoft Excel Programming 3 18th Nov 2009 05:16 PM
Create Worksheet From Values in Existing Cells Using Existing Worksheet as Template. Ardy Microsoft Excel Programming 18 29th Nov 2006 03:23 AM
How do I fill (copy) nonadjacent cells to adjacent cells? =?Utf-8?B?QnVja3lHZW9yZ2U=?= Microsoft Excel Misc 2 22nd Dec 2005 04:18 AM
How to concatenate adjacent cells in a range without using &? =?Utf-8?B?QXJr?= Microsoft Excel Worksheet Functions 4 16th Oct 2005 06:38 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:19 AM.