#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Offset

Hi guys sorry I made a blob I apologize

The T should have been AG

I'm wanting it to paste the Content of AH2 to "AH3 to AH10"
which is to the right of any data cells in column AG, until it finds a blank
cell in column AG then stops pasting to cells in column AH.


AG1 has header
AG2 to AG10 has data in cells

AH1 has header
AH2 data
AH3 to AH10 Blank

Thanks for your reply

DaveM


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Offset

Sub AAA()
Range("AH1").End(xlDown).Select
Selection.Copy ActiveCell.Offset(1, 0)
ActiveCell.Offset(1, 0).Select
Do
ActiveCell.Copy _
ActiveCell.Offset(1, 0)
ActiveCell.Offset(1, 0).Select
Loop Until IsEmpty(Cells(ActiveCell.Row, "AG"))
ActiveCell.ClearContents
End Sub

--
Regards,
Tom Ogilvy


"DavidM" wrote:

Hi guys sorry I made a blob I apologize

The T should have been AG

I'm wanting it to paste the Content of AH2 to "AH3 to AH10"
which is to the right of any data cells in column AG, until it finds a blank
cell in column AG then stops pasting to cells in column AH.


AG1 has header
AG2 to AG10 has data in cells

AH1 has header
AH2 data
AH3 to AH10 Blank

Thanks for your reply

DaveM



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
Compare Cell Values, Offset(-1,0), Offset(-1,-1), and xlFillDefaul RyGuy Excel Worksheet Functions 2 September 28th 07 10:54 PM
Offset Jeze77 Excel Discussion (Misc queries) 0 August 31st 07 02:14 PM
Find, Copy offset to offset on other sheet, Run-time 1004. Finny[_3_] Excel Programming 10 December 7th 06 11:46 PM
select offset (variable ,1) to offset(variable ,variable) Buffyslay Excel Programming 1 November 15th 06 11:45 AM
Problem with Range.Cells.Offset and Range.Cells( row + offset, column) [email protected] Excel Programming 2 August 22nd 05 05:25 AM


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

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"