Shade Alternate Rows using Conditional Formatting
—————————————————————————————————————————-
Shade Alternate Rows, including blank/unused range
Select worksheet range you wish to format
Home -> Conditional Formatting -> New Rule -> select “Use a formula to determine which cells to format” option (Excel 2007)
Format -> Conditional Formatting -> “Formula Is” (earlier versions of Excel)
Enter formula -> =MOD(ROW(),2)=0 {Refer Image 1}
– the MOD function will return the Remainder of the row number when divided by 2
– the ROW function =ROW() will return the row number
– the formula will color even rows, wherein the remainder is 0, and will leave out odd rows wherein remainder is 1
Format -> select “Fill” tab -> choose “Background color” -> Click OK twice (Excel 2007)
Format -> select “Patterns” tab -> choose color -> Click OK twice (earlier versions of Excel)
To clear formatting: Home -> Conditional Formatting -> Clear Rules -> Clear Rules from Selected Cells. (Excel 2007)
Formula Variations:
to color odd rows -> Enter formula -> =MOD(ROW(), 2)=1 or =MOD(ROW(), 2)
to color every third even row -> Enter formula -> =MOD(ROW(), 3)=0 -> to color every n th row use formula =MOD(ROW(), n)=0
=MOD(ROW(), 4)=3 will color every 4th row, starting at row 3 -> =MOD(ROW(), 5)=3 will color every 5th row, starting at row 3 -> =MOD(ROW(), 5)=4 will color every 5th row, starting at row 4, and so on
to color rows in say, bands of 3 -> Enter formula -> =MOD(ROW()-1, 6)<3 Note: “ROW()-1” is used to make the first band equal to 3 rows to color rows in say, bands of 4 -> Enter formula -> =MOD(ROW()-1, 8)<4 -> =MOD(ROW()-1, 2*n)<n is the Formula where bands = n
—————————————————————————————————————————
Shade Alternate Rows, ONLY used range
Select worksheet range A1:C50, starting from A1
Conditional Formatting -> New Rule -> select “Use a formula to determine which cells to format” option (Excel 2007)
Format -> Conditional Formatting -> “Formula Is” (earlier versions of Excel)
Enter formula -> =AND(MOD(ROW(), 2), COUNTA($A1:$C1)) {Refer Image 2}
– Note that the column reference is absolute while row reference is relative ($A1:$C1)
– Every odd row wherein you enter data (in column A to C), will be colored, within the table range A1:C50
– to color even rows -> Enter formula -> =AND(MOD(ROW(), 2)=0, COUNTA($A1:$C1))
Format -> select “Fill” tab -> choose “Background color” -> Click OK twice (Excel 2007)
Format -> select “Patterns” tab -> choose color -> Click OK twice (earlier versions of Excel)
To clear formatting: Home -> Conditional Formatting -> Clear Rules -> Clear Rules from Selected Cells. (Excel 2007)
Shade Alternate Rows – Conditional Formatting
VBA TUTORIAL LOGIN
Hi ,Logout
Cond Statements in VBA Test
Text Strings in VBA
Custom Number Formats
Excel VBA Built-in Events
ActiveX & Form Controls
Application.OnTime Method
MsgBox & InputBox in VBA
- Ebook of Excel Solutions
- Excel Formulas Ebook
- Ebook of Excel Formulas
- Extract Duplicates once, which are Common in 2 Columns
- Count Continuous Non-Blank cells which appear Last
- SUM Cell values containing any of the Multiple Values in Full or in Part
- Calculate End Date (& Time) from Start Date (& Time) and Duration (Work Hours) in Excel
- Extract a Sorted List of Unique values in a column
- Count Rows with occurrence of atleast one number
- SUM of – Last 12 values in a Column, Largest 5 out of Last 12 values, last 12 values Excluding Highest / Lowest
- Position of Last Numeric in a String
- Rank & Sort Column Values, Ignoring Error Values
- Excel Functions
- Excel Text and String Functions: TRIM & CLEAN
- ASCII Code, Extended ASCII characters (8-bit system) and ANSI Code.
- Excel CODE & CHAR Functions, VBA Asc & Chr Functions
- Excel Text and String Functions: LEFT, RIGHT, MID, LEN, FIND, SEARCH, REPLACE, SUBSTITUTE
- CHOOSE Function in Excel
- Excel IF Function and IF Statements
- Excel VLOOKUP Function
- Excel OFFSET Function
- Excel INDIRECT Function
- Excel SUMPRODUCT Function
- Excel Pivot Tables
- Printing a Pivot Table Report – Excel
- Create a Pivot Chart in Excel – graphical display of a Pivot Table
- Excel Pivot Table Design & Layout, Pivot Table Styles
- Excel Pivot Table Report – Sort Data in Row & Column Labels & in Values Area, use Custom Lists
- Excel Pivot Tables: Filter Data, Items, Values & Dates
- Excel Pivot Tables: Insert Calculated Fields & Calculated Items, Create Formulas
- Excel Pivot Table Report – Summary Functions & Custom Calculations, Insert Calculated Fields or Calculated Items
- Excel Pivot Table Report – Group Items, Group Date and Time Values
- Excel Pivot Table Report – Field Settings, Expand or Collapse Fields & Items, Refresh Data, Change Data Source & Show or Hide options
- Excel Pivot Table Report – Clear All, Remove Filters, Select Mutliple Cells or Items, Move a Pivot Table
- Excel Tips
- Case Sensitive Vlookup in Excel; Finding the 1st, 2nd, nth or last occurrence of the Lookup Value
- Vlookup Multiple Values – Return MULTIPLE corresponding values for ONE Lookup Value
- Excel Date and Time Functions and Formulas
- Find ‘Smallest’, ‘Largest’, ‘K-th Smallest’ and ‘K-th Largest’ Numbers in a Range
- Remove Duplicates in a range, using “Remove duplicates” button in Data Tools
- Remove Duplicates or Create a List of Unique Records using Excel Formula
- Remove Duplicates or Create a List of Unique Records using Advanced Data Filter
- Count Number of Unique Values in a Range (with Excel Functions)
- Shade Alternate Rows – Conditional Formatting
- Left Lookup with Vlookup Excel Function
- Excel VBA
- Excel VBA: ActiveX Controls, Form Controls & AutoShapes on a Worksheet
- ChartFormat object – line, fill & effect formatting for chart elements: FillFormat object, LineFormat object, ShadowFormat object, GlowFormat object, SoftEdgeFormat object, ThreeDFormat object
- Child Objects common for many chart elements: Border Object, ChartFillFormat Object, Interior Object, Font Object
- Chart Elements in Excel VBA (Part 2) – Chart Series, Data Labels, Chart Legend
- Chart Elements in Excel VBA (Part 1) – Chart Title, Chart Area, Plot Area, Chart Axes
- Charts in Excel VBA – Add a Chart, the Chart object & the ChartObject object
- Create Charts in Excel VBA: Embedded Charts – Line with Markers; Clustered Stacked Column Chart; Clustered Stacked Bar Chart displaying Variance; Pie chart; XY Scatter chart & Bubble chart
- Excel VBA Debugging Tools in Visual Basic Editor – Breakpoints & Break Mode, Stepping Through Code, Debugging Views
- Excel VBA Errors & Error Handling, On Error & Resume Satements, Exit Statement, Err Object
- Excel VBA Date & Time Functions; Year, Month, Week & Day Functions
- ExcelAnytime Site
- My Account
- Website Use Policy
- Excel VBA Online Tutorial
- Testimonials GlobaliConnect.com
- About ExcelAnytime.com
- Excel VBA Online Tutorial – learn Excel VBA programming & access examples, illustrations, live codes and downloadable files
- Excel and VBA Services
- Sample Data-Articles
- test
- Professionals
- Editors-xtd
- Most Read Content
- Wrapper Module
- Sample Sites
- Search
- News Flash
- Koala
- The Joomla! Community
- Fruit Shop SiteGrowersJoomla!
- The Joomla! Community
- System
- Footer Module
- The Joomla! Project
- User
- Random Image Module
- Upgraders
- Content
- Weblinks Module
- Using Joomla!
- Typography
- Who’s Online
- Authentication
- Latest Users Module
- Editors
- Banner Module
- Editors-xtd
- Custom HTML Module
- Search
- Feed Display
- Login Module
- Who’s Online
- Latest Users Module
- Banner Module
- Custom HTML Module
- Feed Display
- Footer Module
- Random Image Module
- Weblinks Module
- Archive Module
- Archive Module
- Article Categories Module
- Articles Category Module
- Latest Articles Module
- Most Read Content
- News Flash
- Related Items Module
- Cradle Mountain
- Pinnacles
- Blue Mountain Rain Forest
- Ormiston Pound
- Australian Parks
- First Blog Post
- Second Blog Post
- Koala
- Phyllopteryx
- Spotted Quoll
- Ormiston Pound
- Koala
- Phyllopteryx
- Spotted Quoll
- Wobbegone
- Cradle Mountain
- Pinnacles
- Blue Mountain Rain Forest
- VBATutorial - Cond Stmnts