Hi Val

There are several workarounds to solve your problem.
1. You can use formulas in O, P, AW and BL
linked directly to column D.

2. or create a macro to copy values from col.D
to O, P, AW and BL as required. Below is a
code, do reply if this was you looking for:

Sub Copy_Data()
    Dim myCell As Range
    Range("D:D").SpecialCells(xlCellTypeConstants,
23).SpecialCells(xlCellTypeVisible).Select
    For Each myCell In Selection.Cells
        myCell.Offset(0, 11).Value = myCell.Value 'O
        myCell.Offset(0, 12).Value = myCell.Value 'P
        myCell.Offset(0, 45).Value = myCell.Value 'AW
        myCell.Offset(0, 60).Value = myCell.Value 'BL
    Next
End Sub





________________________________________
Thanks & Regards
Ashish Jain
McKinsey India Knowledge Center
(Microsoft Certified Application Specialist)
(Microsoft Certified Professional)
http://www.excelitems.com
http://www.openexcel.com
________________________________________

On Nov 8, 11:15 am, Val367 <val...@gmail.com> wrote:
> Hi
>
> I need some help creating a script. I need it to loop through each row
> of a sheet and replicate the value from D to O, P, AW and BL. The
> number of rows of the sheet will change so I am thinking it will need
> a for - next loop to run to the last row and on each loop it will copy
> the data from cell D* (with * being the current row) to O*, P*, AW*
> and BL*.
>
> ie
> A     B     C    D    ....    O    P   ...   AW   ...   BL
> s      g     e    12          12   12         12          12
> d      f      t     22          22   22         22          22
>
> the last 4 12s on the 2nd line are what the script would have copied
> for line 2, then the last 4 22s are the data copied for line 3 etc
> etc.
>
> Hope that is clear and that somone understands what I need and can
> help.
>
> Thanks
> Val

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/pages/discussexcelcom/160307843985936?v=wall&ref=ts

Reply via email to