rounding down only odd numbers in a column

  • Thread starter Thread starter learninginmn
  • Start date Start date
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?
 
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.
 
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
 
Back
Top