Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 48
Default Conditional Formating =mod($a2,2) = not(mod($a2,2))

i have a quick question

when using this set of formulas in the conditional formatting does it work
on text?

i am trying to alternately highlighting groups of months. for example i have
the month name january in multiple rows, followed by february and so on. i
want each group to hightlight according to the conditional formatting.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Conditional Formating =mod($a2,2) = not(mod($a2,2))

You need to convert those month names into numbers, and one way is to
list the twelve months somewhere, eg N1:N12. Then with A2 selected,
click on Format | Conditional Formatting, and in the CF dialogue box
you can choose Formula Is rather than Cell Value Is and for the
formula enter this:

=AND($A2<"",MOD(MATCH($A2,$N$1:$N$12,0),2)=1)

then click the Format button and choose your format, eg Patterns tab
(for background colour) and choose Pink, then OK your way out. Use the
Format Painter icon to apply the CF to other cells.

Odd-numbered months, i.e. January, March, May etc will appear shaded.

Hope this helps.

Pete

On May 28, 11:16*pm, DawnTreader
wrote:
i have a quick question

when using this set of formulas in the conditional formatting does it work
on text?

i am trying to alternately highlighting groups of months. for example i have
the month name january in multiple rows, followed by february and so on. i
want each group to hightlight according to the conditional formatting.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 48
Default Conditional Formating =mod($a2,2) = not(mod($a2,2))

Thats what i figured.

i created a vlookup to look at a table to find the number of the month and
then used the formulas on that column and it all worked out.

"Pete_UK" wrote:

You need to convert those month names into numbers, and one way is to
list the twelve months somewhere, eg N1:N12. Then with A2 selected,
click on Format | Conditional Formatting, and in the CF dialogue box
you can choose Formula Is rather than Cell Value Is and for the
formula enter this:

=AND($A2<"",MOD(MATCH($A2,$N$1:$N$12,0),2)=1)

then click the Format button and choose your format, eg Patterns tab
(for background colour) and choose Pink, then OK your way out. Use the
Format Painter icon to apply the CF to other cells.

Odd-numbered months, i.e. January, March, May etc will appear shaded.

Hope this helps.

Pete

On May 28, 11:16 pm, DawnTreader
wrote:
i have a quick question

when using this set of formulas in the conditional formatting does it work
on text?

i am trying to alternately highlighting groups of months. for example i have
the month name january in multiple rows, followed by february and so on. i
want each group to hightlight according to the conditional formatting.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Conditional Formating =mod($a2,2) = not(mod($a2,2))

Glad to hear it - thanks for feeding back. With MATCH you get the
position number directly.

Pete

On May 30, 12:17*am, DawnTreader
wrote:
Thats what i figured.

i created a vlookup to look at a table to find the number of the month and
then used the formulas on that column and it all worked out.

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
Conditional Formating PaulW Excel Discussion (Misc queries) 1 March 17th 06 03:04 PM
Install dates formating using conditional formating? Jerry Eggleston Excel Discussion (Misc queries) 2 November 9th 05 05:49 PM
Conditional formating scott45 Excel Worksheet Functions 4 October 4th 05 04:45 PM
Conditional Formating George Excel Worksheet Functions 1 July 26th 05 09:33 PM
Conditional Formating Craley76 Excel Discussion (Misc queries) 3 June 29th 05 08:39 PM


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

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"