Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Getting a range that includes alternate rows only

Without code.......................

You could select the 10000 rows and FormatConditional FormattingFormula is

=MOD(ROW(),2)=1

Format to a nice color and OK


Gord Dibben MS Excel MVP

On Sat, 19 May 2007 12:43:52 -0400, "Gary Keramidas" <GKeramidasATmsn.com
wrote:

you can try something like this
Sub test()
Dim rng As Range
Dim y As Long
Dim ws As Worksheet
Set ws = Worksheets("sheet1")
Set rng = ws.Range("A1:B1000")
With rng
For y = 1 To rng.Rows.Count
If y Mod 2 = 1 Then
Range(ws.Cells(y, "A"), ws.Cells(y,
"B")).Interior.ColorIndex = 43
Else
Range(ws.Cells(y, "A"), ws.Cells(y,
"B")).Interior.ColorIndex = 0
End If
Next
End With

End Sub


Reply
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
Color alternate rows when after hiding selected rows Monk[_2_] Excel Worksheet Functions 6 June 7th 08 01:36 AM
Auto-filter includes too much range Atreides Excel Discussion (Misc queries) 4 May 15th 08 01:23 AM
adding range name that includes a sheet name Jim Cone Excel Programming 0 December 2nd 06 03:15 AM
=max(range includes #N/As) David Excel Worksheet Functions 3 September 14th 05 05:00 PM
How to specify a Range which includes an integer variable Hotbird[_3_] Excel Programming 4 May 7th 04 02:38 PM


All times are GMT +1. The time now is 04:13 PM.

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"