How To Select Odd Numbers In Excel?

Excel- select only integers from a column

  • I have the following question related to Excel. Is there a function that can select values in the following manner?: - I have a column with numbers, consisting either of whole numbers (integers) or number containing decimals. - From this column I would like to extract the sum of all whole number (integers), not included the numbers that contain decimals. background is to calculate logistic costs. All whole pallets will have a certain fixed costs. Combined pallets, so numbers that are given with a decimal will be higher in costs so need to be calculated separately. Best Arno van der Aa

  • Answer:

    Arno, the easiest way would be to have a helper column that indicates the whole numbers Assume that the numbers start in B2. In C2 (or any column), put in a formula like this =if(Trunc(B2)=B2,"Integer","Decimal") then drag fill this down the column. Then you can sum using this helper column =Sumif(C2:C500,"Integer",B2:B500) if you don't want the helper column, you can use an array formula =Sumproduct(--(Trunc(B2:B500)=B2:B500),B2:B500) Both methods worked for me. Adjust the range references in the formulas to reflect the actual location of your data. Hope that answers the questions. If anything is not clear or you have further concerns, please post a followup to this question elaborating on the additional information needed.

Miningco.com Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.