+ Reply to Thread
Results 1 to 4 of 4

Formula for odd or even numbers

Hybrid View

  1. #1
    Registered User
    Join Date
    10-09-2006
    Posts
    21

    Formula for odd or even numbers

    Basically I have one column full of numbers that have text in them (40N006), so I trimmed the last digit to the next column over. Now how do I either use a formula or conditional formatting to output to the next column if the number that was trimmed is an even or odd? It seems simple, but i can't get it. Please help!

  2. #2
    Forum Contributor
    Join Date
    06-21-2005
    Location
    Cambridge, England
    Posts
    118
    try

    =IF(ISODD(A1),A1,"")

    you can also use ISEVEN

    r

  3. #3
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Try this

    Then you won't need column Column

    =IF(ISEVEN(RIGHT(A1,1)),"",RIGHT(A1:A1,1))

    if you need the helper column try

    =IF(ISODD(B1),B1,"")

    VBA Noob

  4. #4
    Registered User
    Join Date
    10-09-2006
    Posts
    21
    Thanks guys! Worked like a charm!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1