Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
jenn
 
Posts: n/a
Default "E" or "O" for the first, even or odd digit in a number

hi there!

I need a formula, to say "E" if the first digit of a four-digit-number in A1
is even. and "O" if its odd. Thanks a lot!
  #2   Report Post  
Biff
 
Posts: n/a
Default

Hi!

Try this:

=IF(A1="","",IF(MOD(LEFT(A1,1),2)=0,"E","O"))

Biff

"jenn" wrote in message
...
hi there!

I need a formula, to say "E" if the first digit of a four-digit-number in
A1
is even. and "O" if its odd. Thanks a lot!



  #3   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Thu, 23 Jun 2005 19:53:01 -0700, "jenn"
wrote:

hi there!

I need a formula, to say "E" if the first digit of a four-digit-number in A1
is even. and "O" if its odd. Thanks a lot!



=IF(MOD(INT(A1/1000),2),"O","E")


--ron
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
16th digit changes?? Problem,16th digit changes to a zero.... [email protected] Excel Worksheet Functions 2 June 2nd 05 08:48 AM
Return a digit in a string of numbers W M Excel Discussion (Misc queries) 5 May 11th 05 06:51 PM
Tell users how to sort 5 digit and 9 digit zipcodes correctly aft. [email protected] New Users to Excel 1 February 18th 05 12:59 AM
16 DIGIT NUMBERS IN CELL WITHOUT LAST DIGIT BEING A ZERO jnkell Excel Worksheet Functions 2 December 18th 04 07:13 PM
When we enter a 16 digit number (credit card) the last digit chan. ceking Excel Discussion (Misc queries) 5 December 8th 04 11:45 PM


All times are GMT +1. The time now is 05:33 AM.

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"