LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default Help wanted with Code, Please

Hi all

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 24/06/2007 by Grandad
'

'Always start in R2C16 loop down one cell at a time, in column P.
Application.Goto Reference:="R2C16"

Dim FoundCell As Range

Set FoundCell = ActiveCell.EntireColumn.Find(What:=ActiveCell.Valu e, _
After:=ActiveCell, LookIn:=xlValues, LookAt:=xlWhole, MatchCase:=False)
If Not FoundCell Is Nothing Then
FoundCell.Select

'I need the "Do" statement above the "Dim" sataement,Is there a way of
getting around this problem.

Do
ActiveCell.Offset(0, -13).Range("A1").Select
Selection.Copy
ActiveCell.Offset(0, 13).Range("A1").Select

On Error Resume Next
With ActiveCell
..EntireColumn.Find(What:=.Text, After:=.Cells(1, 1), LookAt:=xlWhole, _
LookIn:=xlValues, SearchDirection:=xlPrevious, MatchCase:=False).Select
End With
ActiveCell.Offset(0, -11).Range("A1").Select
ActiveSheet.Paste
ActiveCell.Offset(0, 11).Range("A1").Select
ActiveCell.Offset(1, 0).Range("A1").Select
Loop Until IsEmpty(ActiveCell.Offset(0, 11))

End If

End Sub


Any help appreciated

Thanks in advance

Dave


 
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
VBA Code wanted for Excel lost in Chicago[_2_] Excel Discussion (Misc queries) 5 March 4th 08 04:37 AM
Help wanted with VBA code [email protected] Excel Programming 4 September 12th 06 09:44 PM
Editable combo. Elaborate code example wanted. keepITcool Excel Programming 0 October 10th 05 01:01 PM
vba code wanted helmekki[_2_] Excel Programming 2 May 12th 04 11:05 PM
urgent vba code wanted helmekki Excel Programming 2 May 12th 04 12:38 PM


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