Array without falses

  • Thread starter Thread starter Excel
  • Start date Start date
E

Excel

I posted this a long time ago. I thought I'd try again. Please see
below:

Jim Shoenfelt View profile
More options Oct 14 2000, 3:00 am

Newsgroups: microsoft.public.excel
From: Jim Shoenfelt <[email protected]>
Date: 2000/10/14
Subject: Getting an array of selected records with no "FALSE"s
Reply to author | Forward | Print | Individual message | Show original
| Report this message | Find messages by this author
A B
1 apple 3
2 apple 5
3 apple 7
4 banana 13
5 banana 16

I want to write a formula that will return the array {3,5,7}
I try {if(A1.a5 = "apple",B1.b5)}, but that returns:
{3,5,7,False,False}


Is there someway to get this without the "false"s? i.e.to return
{3,5,7}?
--



Sent via Deja.com http://www.deja.com/
Before you buy.
 
You need to enter the formula in 5 cells

=IF(A1:A5 = "apple",B1:B5,"")

will return {3,5,7,"",""}
 
Back
Top