Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How do I apply conditional formatting to even or odd numbers?

I'm trying to change the color of various cells that have the following
string 8056201-001, 8056202-001, 8056203-001, etc. I'd like change the even
numbers to blue text and the odd numbers to green.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default How do I apply conditional formatting to even or odd numbers?

Well XL doesn't consider numbers formatted in that manner to be numbers but
rather strings of text.

How do you consider one of these "numbers" to be even or odd? On the basis
of the last digit? The first digit?

If it's the last then you would do something like
=OR(Right(A1="1",1),...RIGHT(A1="9",1))))

Fill in the ... with 3, 5, and 7

If your determination of odd or even depends on the first character, then
replace RIGHT with LEFT in the above function.

Dave
--
Brevity is the soul of wit.


"pashearer" wrote:

I'm trying to change the color of various cells that have the following
string 8056201-001, 8056202-001, 8056203-001, etc. I'd like change the even
numbers to blue text and the odd numbers to green.

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 formatting similar to shading alternating rows Conan Kelly Excel Worksheet Functions 10 August 22nd 06 11:13 PM
Conditional Formatting : Numbers & Texts Conflict nayinky Excel Worksheet Functions 3 August 8th 06 07:15 AM
apply conditional formatting to negative cell values dona Excel Discussion (Misc queries) 2 March 10th 06 12:04 PM
Conditional Formatting on Whole Numbers? excelgurudummy Excel Worksheet Functions 6 July 21st 05 03:15 AM
EXCEL 2003: Apply Conditional Formatting to COLUMNS HWDFWXCLGuru Excel Worksheet Functions 3 April 1st 05 04:31 PM


All times are GMT +1. The time now is 05:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"