odd/even


Posted by Ziggy on December 03, 2001 6:59 PM

The solution may be obvious but, If I have a list of ODD/Even numbers How can I create seperate lists one for odd and one for even? This needs to be calculated on the position of a particular character (eg the 5th character in all cell's)

eg format: 2A067A

Thanks in advance


Posted by anno on December 03, 2001 8:49 PM

there is probably a neater way to do this, but assuming your list starts in cell a1, in cell b1 put =IF(ISODD(MID(A1,5,1)),B1,"") and copy down as far as needed. in cell c1 put =IF(ISEVEN(MID(A1,5,1)),B1,"") and copy down as far as needed. that will leave the 'odds' in column b and 'evens' in column c.



Posted by anno on December 03, 2001 8:52 PM


=IF(ISODD(MID(A1,5,1)),A1,"") and
=IF(ISEVEN(MID(A1,5,1)),A1,"")