Copy/Paste Loop Conditional Question

SirAsksAlott

New Member
Joined
Aug 21, 2014
Messages
7
Completely new at VBA, having fun learning though. I'm trying to automate reports at the office, and I'm having an issue particularly with looping a specific process. Here's what I have so far:

PHP:
Sheets("Attach Rate").Activate    

Range("F1").EntireColumn.Insert
Range("E:E").CopyIf Range("F3").Value <> "YTD" Then
Range("F:F").PasteSpecial xlPasteAll End If
Range("F:F").Copy
If Range("G3").Value <> "YTD" Then
Range("G:G").PasteSpecial xlPasteAll
End If

What i'd love to do is loop paste one column, and then continually paste that column over entire columns to the right until "YTD" is located at the 3rd row of the next column, and then to stop. This report will continuously add a new week, so the column YTF will continually move over one to the right every week, so it has to be a dynamic loop that will check for that.

Thanks
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,214,979
Messages
6,122,560
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top