Search : in
By :

Color Fill every 2nd row

Last answer on Nov 9, 2009 1:01:00 am GMT picajol, on Nov 6, 2009 9:46:53 pm GMT 
 Report this message to moderators

Hello,
Is it possible to first select a range of rows and then somehow apply a color fill to every odd/even row?
Thanx in advance,.
Is there maybe a plugin for execel that will do something like this automaticly maybe even brig some more decorative option to Excel?
Thanx :-)

Configuration: Windows XP Internet Explorer 7.0

Best answers for « Color Fill every 2nd row » in :
Colouring cells on conditions ShowColouring cells on conditions There are many pratical functions under Excel which is not commonly used. Example: If you wish a cell automatically turns red (or other formatting border, frame etc) under one condition: a result, a...
VB6 Finding the RGB values of a color ShowVB6 Finding the RGB values of a color Dim R as integer Dim G as integer Dim B as integer Sub FindRGB(Col As Long) R = &HFF& And Col G = (&HFF00& And Col ) \ 256 B = (&HFF0000 And Col ) \ 65536 End Sub Note: Here...
Keep a color spot on a black and white photo ShowKeep a color spot on a black and white photo You want to have a black and white except for a portion of the photo to preserve color. For most image modification software: First you must isolate a part of the picture (the one you...
Download Color Cop ShowColor Cop allows to choose a color directly in screen with a pipette and to show it in a visualisor with his code RGB (RVB). It is possible to use a magnifier for a better selection. This software is notably very practical for any webmaster...
Worksheet - Cells ShowThe Concept of a Cell A "cell" is the intersection between a line (horizontal) and a column (vertical) on a worksheet. Thus, the name of the line combined with the name of the column gives the cell's coordinates (the term address is sometimes also...

1

venkat1926, on Nov 7, 2009 12:49:04 am GMT

This macro will color odd rows. if you want to color even rows change in the macro
if c.row mod 2 =1
into
if c.row mod 2=0

Sub test()
Dim r As Range, c As Range
Worksheets("sheet1").Activate
ActiveSheet.Cells.Interior.ColorIndex = xlNone
Set r = Range(Range("A1"), Range("A1").End(xlDown))
For Each c In r
If c.Row Mod 2 = 1 Then c.EntireRow.Interior.ColorIndex = 6
Next c
End Sub

Reply to venkat1926

2

picajol, on Nov 8, 2009 7:34:50 pm GMT

Hey Thanx!
But I have a problem, can you tell me hoe to run this macro?
I dont know anything aboth macros in Excel :-(
Thanx in advance!

Reply to picajol

3

 venkat1926, on Nov 9, 2009 1:01:00 am GMT

Hit ALT+f11
you will get vbeditor. there will be two windows side by side.
if there is only one window hit control+R.
the left hand side is called
pr0ject-VBA project
and right hand side window may be not blank or blank except for some headings.
on the left hand side window find your file name,keep the cursor on(highlighst) the name of the file and click insert(menu)-module(the menu in the vb editor) . The right hand side window will be now blankIn that blank window
copy paste this macro .

now go to the sheet click tools(menu)-macro-macros. you will get the list of macros in all the open workbooks. In the "Macro" window you see "Macro in" at the bottom.
next a small window is there. on the extreme right side of this small window is a tiny arrow. click that arrow and choose "thisworkbook". You will see your macro ,in this case "test".highlight this macro "test". on the right side of this Macro window you will series of buttons like Run,cancel,step info etc. You click "Run". the macro is invoked and you get what you want. I hope my above instructions are clear.

to understand macros see this web page

http://mail.google.com/mail/?shva=1#all/124d39e53f89a618

save this somewhere so that it will be useful

Reply to venkat1926