View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Copying certain values from one column into another column

Assume source data (numbers) in A2 down

In B2:
=IF(A2="","",IF(ISNUMBER(SEARCH(".",A2)),"",ROW()) )
Leave B1 blank

In C2:
=IF(ROWS($1:1)COUNT(B:B),"",INDEX(A:A,SMALL(B:B,R OWS($1:1))))
Select B2:C2, copy down to cover the max expected extent of data in col A.
Minmize/hide away col B. Col C will return the required results, all nmeatly
bunched at the top
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Eddie Morris" wrote:
Dear Experts,

I hope you can provide me with a solution to the following problem I have.

Column A contains both whole numbers and non-whole numbers (decimals). I
wish to write some simple code to tell excel to copy cells that contain whole
numbers only from column A into another column B located elsewhere on the
sheet.
For example, Column A may have whole numbers in every third or seventh cell
(Random). I would like these values to be transferred to column B in order as
they appear.

How do I approach this problem? I understand that I may have to use the IF
function, however I do not know how to implement it.

Any information will be greatly appreciated. Looking forward to hearing from
you.

Kind regards

Eddie