PC Review


Reply
 
 
=?Utf-8?B?Um9uYm8=?=
Guest
Posts: n/a
 
      31st Oct 2006
I have data in cells A1..L1. I have a condition (A,B or C) in cells
H30..S30. Cell A1 corresponds to h30, B1 to I30, etc.

I need a routine that will copy and paste the data down 6 rows based up on
the condition. So for each cell in H30..S30 that has A in it, the routine
will then paste the value 6 rows down.

Any help is appreciated.

Regards
 
Reply With Quote
 
 
 
 
acampbell012@yahoo.com
Guest
Posts: n/a
 
      31st Oct 2006
This may get you started. You can modify the range as needed.

Sub Copyif()
Dim MyRange As Range
Dim MyCell As Range
Set MyRange = Range("H30:S30")
For Each MyCell In MyRange
If MyCell.Value = "A" Then
MyCell.Copy Destination:=Range(MyCell.Address) _
.Offset(6, 0)
End If
Next
End Sub


Ronbo wrote:
> I have data in cells A1..L1. I have a condition (A,B or C) in cells
> H30..S30. Cell A1 corresponds to h30, B1 to I30, etc.
>
> I need a routine that will copy and paste the data down 6 rows based up on
> the condition. So for each cell in H30..S30 that has A in it, the routine
> will then paste the value 6 rows down.
>
> Any help is appreciated.
>
> Regards


 
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
http://LongPathTool.com - find and delete/copy path too long filesfrom your hard drive or LAN Windows tool to copy or delete files and folderswith path too long or filename too long error. Just browse to the file andpress a button to copy or d Martin Krag Windows XP Internet Explorer 0 22nd Apr 2011 10:08 AM
http://LongPathTool.com - find and delete/copy path too long filesfrom your hard drive or LAN Windows tool to copy or delete files and folderswith path too long or filename too long error. Just browse to the file andpress a button to copy or d Martin Krag Windows XP Configuration 0 22nd Apr 2011 10:05 AM
Copy local users and groups, copy shares with security, copy homeuser folders usenet@sphere10.com Microsoft Windows 2000 Active Directory 1 17th Feb 2009 01:31 PM
Copy local users and groups, copy shares with security, copy homeuser folders usenet@sphere10.com Windows Vista General Discussion 2 17th Feb 2009 01:31 PM
EXCEL FILE a copy/a copy/a copy ....filename =?Utf-8?B?dmU=?= Microsoft Excel New Users 1 29th Sep 2005 09:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:21 AM.