Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copy Range / Including Adjacent Cells - into Existing Worksheet.

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Copy Range / Including Adjacent Cells - into Existing Worksheet.

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


" 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
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
How do I copy a range in Excel without including hidden rows? Lang Excel Discussion (Misc queries) 1 February 22nd 08 02:48 PM
Copying Excel Cells including Names Into Existing Spreadsheet MonkeyHanger Excel Worksheet Functions 3 March 28th 07 03:01 AM
Create Worksheet From Values in Existing Cells Using Existing Worksheet as Template. Ardy Excel Programming 18 November 29th 06 03:23 AM
How do I copy every fifth column in one worksheet to adjacent col. Clint Excel Discussion (Misc queries) 0 August 8th 06 08:15 PM
copy worksheet without including vba code cedtech23[_15_] Excel Programming 2 July 23rd 06 10:58 AM


All times are GMT +1. The time now is 04:26 AM.

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"