rounding down only odd numbers in a column

L

learninginmn

Here is my problem. I am trying to figure out the total number of boxes
on a flat surface of shipping palate. The numbers in my chart could be
1,2,3,4,5 in a column. But I need to subtract 1 from all the odd
numbers so the result is this: 1 to stay 1; 2=2, 3=2 4=4, 5=4. Any
suggestions?
 
T

Thomas

If your data started in A1
=IF(A1=1,A1,IF(NOT(MOD(A1,2)=0),A1-1,A1))

Drag the formula down as far as your data goes in that column.
 
R

Ron Rosenfeld

Here is my problem. I am trying to figure out the total number of boxes
on a flat surface of shipping palate. The numbers in my chart could be
1,2,3,4,5 in a column. But I need to subtract 1 from all the odd
numbers so the result is this: 1 to stay 1; 2=2, 3=2 4=4, 5=4. Any
suggestions?


=MAX(1,FLOOR(A1,2))


--ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top