View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Shane Devenshire Shane Devenshire is offline
external usenet poster
 
Posts: 857
Default IF - how to avoid cells with no value

Hi,

Try the following array formula:

=IF(ROW(A1)<=COUNTIF(F$2:F$9,5),INDEX(A$2:A$9,SMAL L(IF(F$2:F$9=5,ROW(F$2:F$9),""),ROW(A1))),"")

To make it an array enter it by pressing Shift+Ctrl+Enter.

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Heidi" wrote:

Hello,
I have a monthly report I have to process. There are two values in column F,
either 5 or 10. If the value of the cell in column F is 5 I want the
information in column A to be displayed, lets say in column J, and if 10 in
column K.

I have used the following formula IF(F2=5,A2,"") which shows me the
information I want in column J. The problem is that I end up with many cells
with no information in columns J and I would like the cells with values from
column A to be displayed after each other without empty cells in between.