ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Copy Top 10 conditional formatting down 1000+ rows (https://www.excelbanter.com/excel-worksheet-functions/263546-copy-top-10-conditional-formatting-down-1000-rows.html)

AdrianTCP

Copy Top 10 conditional formatting down 1000+ rows
 
I have 20 columns which I am using top 10 conditional formatting. When I
copy this (B3:T3) down to the bottom of my spreadsheet, the range changes to
(B4:T1200) instead of each row (such as row 4 = B4:T4 and row 10 = B10:T10).
Any ideas on how to copy this logic down the spreadsheet without doing it
row by row? thanks

Bob Ryan

Copy Top 10 conditional formatting down 1000+ rows
 
This code should work. Start with leftmost cell in top, conditionally
formatted row.
Good luck!


Dim MyCounter As Integer
Range(Selection, Selection.End(xlToRight)).Select
Application.CutCopyMode = False
Selection.Copy
For MyCounter = 1 To 1200
ActiveCell.Offset(1, 0).Activate
Range(Selection, Selection.End(xlToRight)).Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Next MyCounter
End Sub





On 5/11/2010 2:19 PM, AdrianTCP wrote:
I have 20 columns which I am using top 10 conditional formatting. When I
copy this (B3:T3) down to the bottom of my spreadsheet, the range changes to
(B4:T1200) instead of each row (such as row 4 = B4:T4 and row 10 = B10:T10).
Any ideas on how to copy this logic down the spreadsheet without doing it
row by row? thanks




All times are GMT +1. The time now is 01:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com