Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 75
Default IF - how to avoid cells with no value

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.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 175
Default IF - how to avoid cells with no value


In column J, you want to display the value in column A if column F is 5
and 10 in column K and that you have your formula in both J and K
if there is no 5 or 10 in F, the formula will return a blank as in your
formula
Therefore, not sure what you want to achieve here,
would you post a sample and the result you want?
--
Hope this is helpful

Pls click the Yes button below if this post provide answer you have asked


Thank You

cheers, francis



"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.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default IF - how to avoid cells with no value

On 3/7/09 10:14 AM, 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.

Heidi,
It's not exactly clear by your last statement what you intend for your
end result. Could you post an example ?

--
Art
  #4   Report Post  
Posted to microsoft.public.excel.misc
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.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default IF - how to avoid cells with no value

Heidi

To get the values into a contiguous range would require VBA as far as I can
tell from your description.

Or you could autofilter each column J and K in turn for non-blanks then copy
to another range.


Gord Dibben MS Excel MVP

On Sat, 7 Mar 2009 07:14:02 -0800, 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.




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default IF - how to avoid cells with no value

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

That formula will miss the first instance that meets the criteria.

Here's the robust version. Let's assume they want the data starting in cell
J2.

Array entered:

=IF(ROWS(J$2:J2)<=COUNTIF(F$2:F$9,5),INDEX(A$2:A$9 ,SMALL(IF(F$2:F$9=5,ROW(F$2:F$9)),ROWS(J$2:J2))-MIN(ROW(F$2:F$9))+1),"")

--
Biff
Microsoft Excel MVP


"Shane Devenshire" wrote in message
...
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.



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 857
Default IF - how to avoid cells with no value

Hi,

Glad someone is checking. Anyway with the current example, I think just a
minor modifcation is necessary, add the -1.

=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)-1,""),ROW(A1))),"")

Array entered again.
--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"T. Valko" wrote:

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


That formula will miss the first instance that meets the criteria.

Here's the robust version. Let's assume they want the data starting in cell
J2.

Array entered:

=IF(ROWS(J$2:J2)<=COUNTIF(F$2:F$9,5),INDEX(A$2:A$9 ,SMALL(IF(F$2:F$9=5,ROW(F$2:F$9)),ROWS(J$2:J2))-MIN(ROW(F$2:F$9))+1),"")

--
Biff
Microsoft Excel MVP


"Shane Devenshire" wrote in message
...
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.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Make unique cells - Avoid repeating Values Mary Excel Discussion (Misc queries) 1 January 30th 07 09:03 PM
how can avoid considering of blank cells in IF function Lika Excel Worksheet Functions 1 June 12th 06 10:27 AM
Can I avoid plotting 'non-empty' cells germullen Charts and Charting in Excel 2 April 11th 06 02:49 PM
Excel truncated my cells when copying, how to avoid?? bxc2739 Excel Discussion (Misc queries) 0 March 17th 06 04:40 PM
Need formula to avoid ":" in cells with tt:mm morgan Excel Worksheet Functions 2 November 19th 04 09:25 AM


All times are GMT +1. The time now is 12:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"