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
Related Q & A:
- How to add a column header to the dynamic table?Best solution by stackoverflow.com
- How can I sort a column in a DataGrid?Best solution by Stack Overflow
- How to find the column name of the first column with a null value?Best solution by Stack Overflow
- How to dynamically fill empty space in a column?Best solution by stackoverflow.com
- How to change column data's as a separate column wise format in a SQL Server?Best solution by stackoverflow.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
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.