Excel Function for select data which NOT exist from the list

There are 2 data sets are assumed running in A3 and in B3 down, viz.:
In A3 down is: A, B, C, D, E, F, G, H, I, J, K and L
In B3 down is: B, A, H, C, F, I, K, J, H, C and J.

The result which I want is to list or select the data which is NOT exist in
the second set of data (Col B) when compare to the first set of data. 

In my example, the result is D, E, G, and L actomactic appear in cell C3, C4,
C5 and C6 accordingly.
I need an Excel formula to have this result!  

Many thanks, 
Wilchong

-- 
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/excel-new/200804/1

0
wilchong
4/30/2008 2:25:15 AM
excel.newusers 15348 articles. 2 followers. Follow

18 Replies
638 Views

Similar Articles

[PageSpeed] 39

Try this:

A3:A14 = rng1
B3:B13 = rng2

Enter this array formula** in C3 and copy down until you get blanks:

=IF(ROWS(C$3:C3)<=SUM(--(COUNTIF(rng2,rng1)=0)),INDEX(rng1,SMALL(IF(COUNTIF(rng2,rng1)=0,ROW(rng1)-MIN(ROW(rng1))+1),ROWS(C$3:C3))),"")

** array formulas need to be entered using the key combination of 
CTRL,SHIFT,ENTER (not just ENTER)

-- 
Biff
Microsoft Excel MVP


"wilchong via OfficeKB.com" <u43231@uwe> wrote in message 
news:836e39f005b4d@uwe...
> There are 2 data sets are assumed running in A3 and in B3 down, viz.:
> In A3 down is: A, B, C, D, E, F, G, H, I, J, K and L
> In B3 down is: B, A, H, C, F, I, K, J, H, C and J.
>
> The result which I want is to list or select the data which is NOT exist 
> in
> the second set of data (Col B) when compare to the first set of data.
>
> In my example, the result is D, E, G, and L actomactic appear in cell C3, 
> C4,
> C5 and C6 accordingly.
> I need an Excel formula to have this result!
>
> Many thanks,
> Wilchong
>
> -- 
> Message posted via OfficeKB.com
> http://www.officekb.com/Uwe/Forums.aspx/excel-new/200804/1
> 


0
biffinpitt (3172)
4/30/2008 6:24:37 AM
Hello Biff,
Many thanks for your help!  First of all, I tried the formula but failed to
work. May be this is my problem of understanding the formula. 
 
In your note, it indicates that A3:A14 = rng1 & B3:B13 = rng2.  As a result,
in the function of COUNTIF(rng2,rng1), I convert it to COUNTIF(B3:B13,A3), am
I right?  Please help me on this!

The second question is the function of ROW(rng1), I converted it to ROW(A3:
A14), am I right?

Many thanks for your advice!
Wilchong




T. Valko wrote:
>Try this:
>
>A3:A14 = rng1
>B3:B13 = rng2
>
>Enter this array formula** in C3 and copy down until you get blanks:
>
>=IF(ROWS(C$3:C3)<=SUM(--(COUNTIF(rng2,rng1)=0)),INDEX(rng1,SMALL(IF(COUNTIF(rng2,rng1)=0,ROW(rng1)-MIN(ROW(rng1))+1),ROWS(C$3:C3))),"")
>
>** array formulas need to be entered using the key combination of 
>CTRL,SHIFT,ENTER (not just ENTER)
>
>> There are 2 data sets are assumed running in A3 and in B3 down, viz.:
>> In A3 down is: A, B, C, D, E, F, G, H, I, J, K and L
>[quoted text clipped - 11 lines]
>> Many thanks,
>> Wilchong

-- 
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/excel-new/200804/1

0
wilchong
4/30/2008 6:57:41 AM
Here it is with the references:

=IF(ROWS(C$3:C3)<=SUM(--(COUNTIF(B$3:B$13,A$3:A$14)=0)),INDEX(A$3:A$14,SMALL(IF(COUNTIF(B$3:B$13,A$3:A$14)=0,ROW(A$3:A$14)-MIN(ROW(A$3:A$14))+1),ROWS(C$3:C3))),"")

Be sure to enter it as an array or it won't work properly:

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)



-- 
Biff
Microsoft Excel MVP


"wilchong via OfficeKB.com" <u43231@uwe> wrote in message 
news:83709ae42b123@uwe...
> Hello Biff,
> Many thanks for your help!  First of all, I tried the formula but failed 
> to
> work. May be this is my problem of understanding the formula.
>
> In your note, it indicates that A3:A14 = rng1 & B3:B13 = rng2.  As a 
> result,
> in the function of COUNTIF(rng2,rng1), I convert it to COUNTIF(B3:B13,A3), 
> am
> I right?  Please help me on this!
>
> The second question is the function of ROW(rng1), I converted it to 
> ROW(A3:
> A14), am I right?
>
> Many thanks for your advice!
> Wilchong
>
>
>
>
> T. Valko wrote:
>>Try this:
>>
>>A3:A14 = rng1
>>B3:B13 = rng2
>>
>>Enter this array formula** in C3 and copy down until you get blanks:
>>
>>=IF(ROWS(C$3:C3)<=SUM(--(COUNTIF(rng2,rng1)=0)),INDEX(rng1,SMALL(IF(COUNTIF(rng2,rng1)=0,ROW(rng1)-MIN(ROW(rng1))+1),ROWS(C$3:C3))),"")
>>
>>** array formulas need to be entered using the key combination of
>>CTRL,SHIFT,ENTER (not just ENTER)
>>
>>> There are 2 data sets are assumed running in A3 and in B3 down, viz.:
>>> In A3 down is: A, B, C, D, E, F, G, H, I, J, K and L
>>[quoted text clipped - 11 lines]
>>> Many thanks,
>>> Wilchong
>
> -- 
> Message posted via OfficeKB.com
> http://www.officekb.com/Uwe/Forums.aspx/excel-new/200804/1
> 


0
biffinpitt (3172)
4/30/2008 7:07:58 AM
Thank you Biff.
The formula is working, however, the formula ONLY list "D" from cell C3 to
C14. 

Do you think the existing formula can be adjusted or revised to the result I
want, that is D, E, G, and L actomactic appear in cell C3, C4, C5 and C6
accordingly and C7 to C14 are the cells not display any thing. 

Many thanks for your effort and time again!  

Wilchong


T. Valko wrote:
>Here it is with the references:
>
>=IF(ROWS(C$3:C3)<=SUM(--(COUNTIF(B$3:B$13,A$3:A$14)=0)),INDEX(A$3:A$14,SMALL(IF(COUNTIF(B$3:B$13,A$3:A$14)=0,ROW(A$3:A$14)-MIN(ROW(A$3:A$14))+1),ROWS(C$3:C3))),"")
>
>Be sure to enter it as an array or it won't work properly:
>
>** array formulas need to be entered using the key combination of
>CTRL,SHIFT,ENTER (not just ENTER)
>
>> Hello Biff,
>> Many thanks for your help!  First of all, I tried the formula but failed 
>[quoted text clipped - 31 lines]
>>>> Many thanks,
>>>> Wilchong

-- 
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/excel-new/200804/1

0
wilchong
4/30/2008 7:44:05 AM
The formula works.

It sounds like you might have calculation set to manual. Make sure 
calculation is set to Automatic:

Tools>Options>Calculation tab>Automatic

-- 
Biff
Microsoft Excel MVP


"wilchong via OfficeKB.com" <u43231@uwe> wrote in message 
news:837102ca9cf99@uwe...
> Thank you Biff.
> The formula is working, however, the formula ONLY list "D" from cell C3 to
> C14.
>
> Do you think the existing formula can be adjusted or revised to the result 
> I
> want, that is D, E, G, and L actomactic appear in cell C3, C4, C5 and C6
> accordingly and C7 to C14 are the cells not display any thing.
>
> Many thanks for your effort and time again!
>
> Wilchong
>
>
> T. Valko wrote:
>>Here it is with the references:
>>
>>=IF(ROWS(C$3:C3)<=SUM(--(COUNTIF(B$3:B$13,A$3:A$14)=0)),INDEX(A$3:A$14,SMALL(IF(COUNTIF(B$3:B$13,A$3:A$14)=0,ROW(A$3:A$14)-MIN(ROW(A$3:A$14))+1),ROWS(C$3:C3))),"")
>>
>>Be sure to enter it as an array or it won't work properly:
>>
>>** array formulas need to be entered using the key combination of
>>CTRL,SHIFT,ENTER (not just ENTER)
>>
>>> Hello Biff,
>>> Many thanks for your help!  First of all, I tried the formula but failed
>>[quoted text clipped - 31 lines]
>>>>> Many thanks,
>>>>> Wilchong
>
> -- 
> Message posted via OfficeKB.com
> http://www.officekb.com/Uwe/Forums.aspx/excel-new/200804/1
> 


0
biffinpitt (3172)
4/30/2008 4:35:47 PM
The named ranges are self-explanatory.

=3DIF(SUM(N(COUNTIF(BB,AA)=3D0))<ROW(A1),"",INDIRECT("A"&SMALL(IF(COUNTIF=
(BB,AA)=3D0,ROW(AA)),ROW(A1))))

Put this in cell C3 using Ctrl + Shift + Enter, then fill/copy down as =
required.
The suggestions provided by T. Valko and this one do work, but they =
based on the examples you posted.  If the return value is not in the =
first column you'll need to adjust the formula yourself - like the "A" =
bit for example to the letter for that column.

The reason these are different, is there are many ways to do the same =
thing in XL, and we do love arguing ...er, I mean discussing which one =
is best :)

> The formula is working, however, the formula ONLY list "D" from cell =
C3 to
> C14.
This indicates you have failed to understand how to enter array formulae =
(look it up), or have array entered all at once - not for this solution.

Regards
Robert McCurdy
"wilchong via OfficeKB.com" <u43231@uwe> wrote in message =
news:837102ca9cf99@uwe...
> Thank you Biff.
> The formula is working, however, the formula ONLY list "D" from cell =
C3 to
> C14.=20
>=20
> Do you think the existing formula can be adjusted or revised to the =
result I
> want, that is D, E, G, and L actomactic appear in cell C3, C4, C5 and =
C6
> accordingly and C7 to C14 are the cells not display any thing.=20
>=20
> Many thanks for your effort and time again! =20
>=20
> Wilchong
>=20
>=20
> T. Valko wrote:
>>Here it is with the references:
>>
>>=3DIF(ROWS(C$3:C3)<=3DSUM(--(COUNTIF(B$3:B$13,A$3:A$14)=3D0)),INDEX(A$3=
:A$14,SMALL(IF(COUNTIF(B$3:B$13,A$3:A$14)=3D0,ROW(A$3:A$14)-MIN(ROW(A$3:A=
$14))+1),ROWS(C$3:C3))),"")
>>
>>Be sure to enter it as an array or it won't work properly:
>>
>>** array formulas need to be entered using the key combination of
>>CTRL,SHIFT,ENTER (not just ENTER)
>>
>>> Hello Biff,
>>> Many thanks for your help!  First of all, I tried the formula but =
failed=20
>>[quoted text clipped - 31 lines]
>>>>> Many thanks,
>>>>> Wilchong
>=20
> --=20
> Message posted via OfficeKB.com
> http://www.officekb.com/Uwe/Forums.aspx/excel-new/200804/1
>
0
robertwm (27)
5/1/2008 8:56:14 AM
Thank Robert and Biff,
Let me study your instruction carefully first, I will let your all know the
result!

Many thanks,
Wilson




Robert McCurdy wrote:
>The named ranges are self-explanatory.
>
>=IF(SUM(N(COUNTIF(BB,AA)=0))<ROW(A1),"",INDIRECT("A"&SMALL(IF(COUNTIF(BB,AA)=0,ROW(AA)),ROW(A1))))
>
>Put this in cell C3 using Ctrl + Shift + Enter, then fill/copy down as required.
>The suggestions provided by T. Valko and this one do work, but they based on the examples you posted.  If the return value is not in the first column you'll need to adjust the formula yourself - like the "A" bit for example to the letter for that column.
>
>The reason these are different, is there are many ways to do the same thing in XL, and we do love arguing ...er, I mean discussing which one is best :)
>
>> The formula is working, however, the formula ONLY list "D" from cell C3 to
>> C14.
>This indicates you have failed to understand how to enter array formulae (look it up), or have array entered all at once - not for this solution.
>
>Regards
>Robert McCurdy
>> Thank you Biff.
>> The formula is working, however, the formula ONLY list "D" from cell C3 to
>[quoted text clipped - 22 lines]
>>>>>> Many thanks,
>>>>>> Wilchong

-- 
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/excel-new/200805/1

0
wilchong
5/2/2008 1:32:08 AM
Hello Biff,
I have checked with my Excel spreadsheet and confirmed to you that the
"calculation" in spreadsheet is set "Automatic"!   The formula still doesn't
work exactly!

Thanks,
Wilchong




T. Valko wrote:
>The formula works.
>
>It sounds like you might have calculation set to manual. Make sure 
>calculation is set to Automatic:
>
>Tools>Options>Calculation tab>Automatic
>
>> Thank you Biff.
>> The formula is working, however, the formula ONLY list "D" from cell C3 to
>[quoted text clipped - 23 lines]
>>>>>> Many thanks,
>>>>>> Wilchong

-- 
Message posted via http://www.officekb.com

0
wilchong
5/2/2008 1:34:59 AM
Here's a small sample file that demonstrates this:

xExtractMissing.xls  15kb

http://cjoint.com/?fcepu2wnPz

-- 
Biff
Microsoft Excel MVP


"wilchong via OfficeKB.com" <u43231@uwe> wrote in message 
news:8386ef316b61a@uwe...
> Hello Biff,
> I have checked with my Excel spreadsheet and confirmed to you that the
> "calculation" in spreadsheet is set "Automatic"!   The formula still 
> doesn't
> work exactly!
>
> Thanks,
> Wilchong
>
>
>
>
> T. Valko wrote:
>>The formula works.
>>
>>It sounds like you might have calculation set to manual. Make sure
>>calculation is set to Automatic:
>>
>>Tools>Options>Calculation tab>Automatic
>>
>>> Thank you Biff.
>>> The formula is working, however, the formula ONLY list "D" from cell C3 
>>> to
>>[quoted text clipped - 23 lines]
>>>>>>> Many thanks,
>>>>>>> Wilchong
>
> -- 
> Message posted via http://www.officekb.com
> 


0
biffinpitt (3172)
5/2/2008 2:16:55 AM
Good Morning Biff,
I got the file, I will study it carefully!

Many thanks for your help!

Wilchong




T. Valko wrote:
>Here's a small sample file that demonstrates this:
>
>xExtractMissing.xls  15kb
>
>http://cjoint.com/?fcepu2wnPz
>
>> Hello Biff,
>> I have checked with my Excel spreadsheet and confirmed to you that the
>[quoted text clipped - 18 lines]
>>>>>>>> Many thanks,
>>>>>>>> Wilchong

-- 
Message posted via http://www.officekb.com

0
wilchong
5/2/2008 2:24:30 AM
Dear Biff,
Thank you so much for your Excel demo file.  I finally found out what wrong
with me!  It is because my insufficient knowledge regarding the function
"enter" procedure.  The reason I did wrong is because I highlighed the whole
cell range from C3 to C14 and  press CTRL, SHIFT and ENTER at the same time.
Before, it is the only way I know.  Right now, I know CTRL, SHIFT and ENTER
can enter in one cell first and copy!  

Actually, may I ask you one question, what is the logic in your function
which can list the missing data from second set of data? I saw you have put --
infront of COUNTIF function, what is that mean?

I am so appreciate your effort, time and patient!  
So thankful!  
Wilchong



T. Valko wrote:
>Here's a small sample file that demonstrates this:
>
>xExtractMissing.xls  15kb
>
>http://cjoint.com/?fcepu2wnPz
>
>> Hello Biff,
>> I have checked with my Excel spreadsheet and confirmed to you that the
>[quoted text clipped - 18 lines]
>>>>>>>> Many thanks,
>>>>>>>> Wilchong

-- 
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/excel-new/200805/1

0
wilchong
5/2/2008 4:02:02 AM
> Actually, may I ask you one question, what is the logic in your function
> which can list the missing data from second set of data? I saw you have 
> put --
> infront of COUNTIF function, what is that mean?

We use COUNTIF to identify which items are missing from column B.

INDEX(A$3:A$14,SMALL(IF(COUNTIF(B$3:B$13,A$3:A$14)=0,ROW(A$3:A$14)-MIN(ROW(A$3:A$14))+1),ROWS(C$3:C3)))

The COUNTIF function returns an array of counts like this:

COUNTIF(B$3:B$13,A3) = 1
COUNTIF(B$3:B$13,A4) = 1
COUNTIF(B$3:B$13,A5) = 2
COUNTIF(B$3:B$13,A6) = 0
COUNTIF(B$3:B$13,A7) = 0
etc
etc

Where the result of that count is 0 we use this expression to calculate what 
row the corresponding value is located on.

ROW(A$3:A$14)-MIN(ROW(A$3:A$14))+1

That number is then passed to the INDEX function to produce the desired 
result.


-- 
Biff
Microsoft Excel MVP


"wilchong via OfficeKB.com" <u43231@uwe> wrote in message 
news:838837beccb0a@uwe...
> Dear Biff,
> Thank you so much for your Excel demo file.  I finally found out what 
> wrong
> with me!  It is because my insufficient knowledge regarding the function
> "enter" procedure.  The reason I did wrong is because I highlighed the 
> whole
> cell range from C3 to C14 and  press CTRL, SHIFT and ENTER at the same 
> time.
> Before, it is the only way I know.  Right now, I know CTRL, SHIFT and 
> ENTER
> can enter in one cell first and copy!
>
> Actually, may I ask you one question, what is the logic in your function
> which can list the missing data from second set of data? I saw you have 
> put --
> infront of COUNTIF function, what is that mean?
>
> I am so appreciate your effort, time and patient!
> So thankful!
> Wilchong
>
>
>
> T. Valko wrote:
>>Here's a small sample file that demonstrates this:
>>
>>xExtractMissing.xls  15kb
>>
>>http://cjoint.com/?fcepu2wnPz
>>
>>> Hello Biff,
>>> I have checked with my Excel spreadsheet and confirmed to you that the
>>[quoted text clipped - 18 lines]
>>>>>>>>> Many thanks,
>>>>>>>>> Wilchong
>
> -- 
> Message posted via OfficeKB.com
> http://www.officekb.com/Uwe/Forums.aspx/excel-new/200805/1
> 


0
biffinpitt (3172)
5/3/2008 3:51:37 AM
Dear Biff,
Many thank for your explanation.  Actually, another point of the Excel
function is that why you put "--" before (COUNTIF(B$3:B$13,A$3:A$14)=0)),
INDEX(……………!  

What is the purpose of  "--" if mix with Excel function!  

Thank for your time and effort again!  
Wilchong





T. Valko wrote:
>> Actually, may I ask you one question, what is the logic in your function
>> which can list the missing data from second set of data? I saw you have 
>> put --
>> infront of COUNTIF function, what is that mean?
>
>We use COUNTIF to identify which items are missing from column B.
>
>INDEX(A$3:A$14,SMALL(IF(COUNTIF(B$3:B$13,A$3:A$14)=0,ROW(A$3:A$14)-MIN(ROW(A$3:A$14))+1),ROWS(C$3:C3)))
>
>The COUNTIF function returns an array of counts like this:
>
>COUNTIF(B$3:B$13,A3) = 1
>COUNTIF(B$3:B$13,A4) = 1
>COUNTIF(B$3:B$13,A5) = 2
>COUNTIF(B$3:B$13,A6) = 0
>COUNTIF(B$3:B$13,A7) = 0
>etc
>etc
>
>Where the result of that count is 0 we use this expression to calculate what 
>row the corresponding value is located on.
>
>ROW(A$3:A$14)-MIN(ROW(A$3:A$14))+1
>
>That number is then passed to the INDEX function to produce the desired 
>result.
>
>> Dear Biff,
>> Thank you so much for your Excel demo file.  I finally found out what 
>[quoted text clipped - 28 lines]
>>>>>>>>>> Many thanks,
>>>>>>>>>> Wilchong

-- 
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/excel-new/200805/1

0
wilchong
5/5/2008 8:18:17 AM
The "--" converts TRUE and FALSE to 1 and 0 respectively.

This expression will return an array of either TRUE or FALSE:

COUNTIF(B$3:B$13,A$3:A$14)=0

The "--" converts those either 1 or 0:

--(COUNTIF(B$3:B$13,A$3:A$14)=0)

Then the SUM function adds those 1s and 0s to get a total:

SUM(--(COUNTIF(B$3:B$13,A$3:A$14)=0))


-- 
Biff
Microsoft Excel MVP


"wilchong via OfficeKB.com" <u43231@uwe> wrote in message 
news:83b02c6892c7c@uwe...
> Dear Biff,
> Many thank for your explanation.  Actually, another point of the Excel
> function is that why you put "--" before (COUNTIF(B$3:B$13,A$3:A$14)=0)),
> INDEX(.....!
>
> What is the purpose of  "--" if mix with Excel function!
>
> Thank for your time and effort again!
> Wilchong
>
>
>
>
>
> T. Valko wrote:
>>> Actually, may I ask you one question, what is the logic in your function
>>> which can list the missing data from second set of data? I saw you have
>>> put --
>>> infront of COUNTIF function, what is that mean?
>>
>>We use COUNTIF to identify which items are missing from column B.
>>
>>INDEX(A$3:A$14,SMALL(IF(COUNTIF(B$3:B$13,A$3:A$14)=0,ROW(A$3:A$14)-MIN(ROW(A$3:A$14))+1),ROWS(C$3:C3)))
>>
>>The COUNTIF function returns an array of counts like this:
>>
>>COUNTIF(B$3:B$13,A3) = 1
>>COUNTIF(B$3:B$13,A4) = 1
>>COUNTIF(B$3:B$13,A5) = 2
>>COUNTIF(B$3:B$13,A6) = 0
>>COUNTIF(B$3:B$13,A7) = 0
>>etc
>>etc
>>
>>Where the result of that count is 0 we use this expression to calculate 
>>what
>>row the corresponding value is located on.
>>
>>ROW(A$3:A$14)-MIN(ROW(A$3:A$14))+1
>>
>>That number is then passed to the INDEX function to produce the desired
>>result.
>>
>>> Dear Biff,
>>> Thank you so much for your Excel demo file.  I finally found out what
>>[quoted text clipped - 28 lines]
>>>>>>>>>>> Many thanks,
>>>>>>>>>>> Wilchong
>
> -- 
> Message posted via OfficeKB.com
> http://www.officekb.com/Uwe/Forums.aspx/excel-new/200805/1
> 


0
biffinpitt (3172)
5/5/2008 4:58:40 PM
Dear T. Valko,
Really thank for your help. I am thinking how to revise the existing Excel
function if I want the Excel formula extracts the data which has appear in
col B.  In my early example, the result will be A, B, C, F, H, I, J,and K
actomactic appear from the cell C3 to C10  accordingly.  

I need an Excel formula to have this result! 

 It is just the OPPOSITE what the function do for "extracting missing data"!

Many thanks, 
Wilchong




T. Valko wrote:
>The "--" converts TRUE and FALSE to 1 and 0 respectively.
>
>This expression will return an array of either TRUE or FALSE:
>
>COUNTIF(B$3:B$13,A$3:A$14)=0
>
>The "--" converts those either 1 or 0:
>
>--(COUNTIF(B$3:B$13,A$3:A$14)=0)
>
>Then the SUM function adds those 1s and 0s to get a total:
>
>SUM(--(COUNTIF(B$3:B$13,A$3:A$14)=0))
>
>> Dear Biff,
>> Many thank for your explanation.  Actually, another point of the Excel
>[quoted text clipped - 39 lines]
>>>>>>>>>>>> Many thanks,
>>>>>>>>>>>> Wilchong

-- 
Message posted via http://www.officekb.com

0
wilchong
5/6/2008 1:57:52 AM
You can use the same formula just change:

=0 to >0 (in 2 places)

=IF(ROWS(C$3:C3)<=SUM(--(COUNTIF(rng2,rng1)>0)),INDEX(rng1,SMALL(IF(COUNTIF(rng2,rng1)>0,ROW(rng1)-MIN(ROW(rng1))+1),ROWS(C$3:C3))),"")

Don't forget: array entered!

-- 
Biff
Microsoft Excel MVP


"wilchong via OfficeKB.com" <u43231@uwe> wrote in message 
news:83b96cc0ca763@uwe...
> Dear T. Valko,
> Really thank for your help. I am thinking how to revise the existing Excel
> function if I want the Excel formula extracts the data which has appear in
> col B.  In my early example, the result will be A, B, C, F, H, I, J,and K
> actomactic appear from the cell C3 to C10  accordingly.
>
> I need an Excel formula to have this result!
>
> It is just the OPPOSITE what the function do for "extracting missing 
> data"!
>
> Many thanks,
> Wilchong
>
>
>
>
> T. Valko wrote:
>>The "--" converts TRUE and FALSE to 1 and 0 respectively.
>>
>>This expression will return an array of either TRUE or FALSE:
>>
>>COUNTIF(B$3:B$13,A$3:A$14)=0
>>
>>The "--" converts those either 1 or 0:
>>
>>--(COUNTIF(B$3:B$13,A$3:A$14)=0)
>>
>>Then the SUM function adds those 1s and 0s to get a total:
>>
>>SUM(--(COUNTIF(B$3:B$13,A$3:A$14)=0))
>>
>>> Dear Biff,
>>> Many thank for your explanation.  Actually, another point of the Excel
>>[quoted text clipped - 39 lines]
>>>>>>>>>>>>> Many thanks,
>>>>>>>>>>>>> Wilchong
>
> -- 
> Message posted via http://www.officekb.com
> 


0
biffinpitt (3172)
5/6/2008 3:46:33 AM
Dear T. Valko,
Many thanks!  It works extremely well!  
Thanks, 
Wilchong



T. Valko wrote:
>You can use the same formula just change:
>
>=0 to >0 (in 2 places)
>
>=IF(ROWS(C$3:C3)<=SUM(--(COUNTIF(rng2,rng1)>0)),INDEX(rng1,SMALL(IF(COUNTIF(rng2,rng1)>0,ROW(rng1)-MIN(ROW(rng1))+1),ROWS(C$3:C3))),"")
>
>Don't forget: array entered!
>
>> Dear T. Valko,
>> Really thank for your help. I am thinking how to revise the existing Excel
>[quoted text clipped - 29 lines]
>>>>>>>>>>>>>> Many thanks,
>>>>>>>>>>>>>> Wilchong

-- 
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/excel-new/200805/1

0
wilchong
5/6/2008 3:58:36 AM
You're welcome. Thanks for the feedback!

-- 
Biff
Microsoft Excel MVP


"wilchong via OfficeKB.com" <u43231@uwe> wrote in message 
news:83ba7aadcab8c@uwe...
> Dear T. Valko,
> Many thanks!  It works extremely well!
> Thanks,
> Wilchong
>
>
>
> T. Valko wrote:
>>You can use the same formula just change:
>>
>>=0 to >0 (in 2 places)
>>
>>=IF(ROWS(C$3:C3)<=SUM(--(COUNTIF(rng2,rng1)>0)),INDEX(rng1,SMALL(IF(COUNTIF(rng2,rng1)>0,ROW(rng1)-MIN(ROW(rng1))+1),ROWS(C$3:C3))),"")
>>
>>Don't forget: array entered!
>>
>>> Dear T. Valko,
>>> Really thank for your help. I am thinking how to revise the existing 
>>> Excel
>>[quoted text clipped - 29 lines]
>>>>>>>>>>>>>>> Many thanks,
>>>>>>>>>>>>>>> Wilchong
>
> -- 
> Message posted via OfficeKB.com
> http://www.officekb.com/Uwe/Forums.aspx/excel-new/200805/1
> 


0
biffinpitt (3172)
5/6/2008 6:58:23 AM
Reply:

Similar Artilces:

formula within IF function
How do I use a formula within the IF function? What I want to do is check if a number is less than or equal to an amount, calculate one thing, if it is not, calculate another. I tried this: IF(B21<=150,"=B21*E32","150*E32) But I only get text returned. Please help!! Thanks -- Shirley Try... =IF(B21<=150,B21*E32,150*E32) Hope this helps! In article <FB9680A4-1BB7-46AD-BF6D-0088535AE979@microsoft.com>, "Shirley" <Shirley@discussions.microsoft.com> wrote: > How do I use a formula within the IF function? What I want to do is check if >...

The opposite of the "sort" function
I have a list of alphabetically ordered data in a column. Is there a function for randomizing the order of these data? see http://www.mcgimpsey.com/excel/udfs/samplenoreplace.html In article <1174843249.583556.129830@b75g2000hsg.googlegroups.com>, lucavilla@cashette.com wrote: > I have a list of alphabetically ordered data in a column. > Is there a function for randomizing the order of these data? Exellent solution! thanks! Let's say your data in A1:A10 In B1: =RAND() copy from B1 to B10 Select A1:B10 > Data > Sort > Sort by select Column B > select As...

Looking for Excel Help
I'm a very novice Excel user and am looking for a little help with creating a formula for a spreadsheet I'm creating for my personal use. I would appreciate some assistance if possible. Thanks in advance. Dan --- Message posted from http://www.ExcelForum.com/ Hi Dan! Post a sample of what you want to do. Your question is just a tad open ended <g> -- Regards Norman Harker MVP (Excel) Sydney, Australia njharker@optusnet.com.au Excel and Word Function Lists (Classifications, Syntax and Arguments) available free to good homes. "DanB4105" <DanB4105.ywtpa@excelfor...

New to excel
Hi All, I'm new to Excel ( and to this forum :) ) and so I hope somebody may b able to help me. I've got 2 questions.... QUESTION 1 I've got a spreadsheet which takes data from one worksheet and uses i to calculate data in a second worksheet using the following code formula: =IF('4th November 2005'!B19="","nothing here dude",IF(B19<'4th Novembe 2005'!B19,"UP",IF(B19='4th November 2005'!B19,"Same",IF(B19>'4t November 2005'!B19,"DOWN")))) The problem is, when I create a new worksheet I have...

Using Relative path for XML data file?
Is there a way to specify a relative path to an XML data file imported into Excel 2003? I am writing a web app that generates report data as XML for the user to download to their local machine. This data is to be consumed by an Excel reporting spreadsheet, which contains display-formatted tables and charts that are mapped to various data fields in an XML Map, which is in turn linked to the xml data file they will download. The idea is the user only needs to download the data for updates, not the whole spreadsheet. However, since I cannot predict the path where the user will store their...

Changing Cells and entering data in them
Thanks for the help again. Big thanks to Steve you've got me this far. I went out and bought a book, but it's like reading a foreign language. I was informed today that I can't have message boxes come up. I need to have the code point at the cells and if they are blank turn which ever one is blank red or if both are then both turn red then pause for each cell to be filled in. Cell F14 "Last Name" then automatically go to Cell F16 "First Name" on tab or enter. Basically if Cell F22 or F23 has an X in it, Cells F14 an F16 turn red and cell F14 has the focus...

Excel button problem
Hi All I have a macro that copies a worksheet in the active workbook and puts it into a new workbook - then formats it and deletes any buttons on the worksheet. On the first click on the button the macro works ok. On the second click, it fails because the all assigned macros on all buttons in the active workbook changed from "mba" to "book1!mba". Book 1 doesn't exists (wasn't opened, wasn't saved, doesn't have the macros). I've never experienced this problem before?? Can anyone help to solve this problem? FYI The macro to do this is c...

Excel 97 #9
Please can anyone help??? I have two columns in Excel 97. The first contains a list of statu values eg. pending, or granted or withdrawn. The second contains date eg.01/12/1997, 05/06/2003. I woudl like to know how to get all th granted apps before 31/12/2003. Can anyone help please -- Message posted from http://www.ExcelForum.com theres many ways, but an easiest way would be to do a sort. Highlight the 2 columns, click on data, then sort, then sort by status, then by date. this should group them all together. hope this helps...toe >-----Original Message----- >Please can anyo...

how to find an item in a list control?
hi all, In a list Control how to find an item. If it is found then the item should be highlighted. how to do this? i wrote the following code but its not working what's wrong in the code? LVFINDINFO info; int nIndex; info.flags = LVFI_PARTIAL|LVFI_STRING; info.psz = (LPCTSTR) str; //fd.m_strEditCtrl; sprintf(st,"%d",m_ListCtrl.GetItemCount()); MessageBox(st,"Count"); for(int i=0;i < m_ListCtrl.GetItemCount();i++) { if((nIndex = m_ListCtrl.FindItem(&info,-1)) == -1 ) { m_ListCtrl.SetItemState(nIndex,LVIS_SELECTED,LVIS_SELECTED); } } thanks and r...

data sort
ok now should be simple >> I need to sort by month on data that is held in format >> day/month so eg 1511 1510 3011 3010 now custom/ends with/ 11... does not work custom/ends with/ ??11.. or *11 does not work either contains 11 does not work (& would also be wrong if data set contained 1011) but still I am stumped so any help would be great cheers Alex I would be inclined to add a new, temporary field of formulas that pull off the right 2 digits, and sort by that: =RIGHT(A1,2) -- Jim Rech Excel MVP ...

contact list #13
Good Day, I hope I am in the right area, we are running Exchange 2003 one Server 2003 and have Outlook 03 clients. We have address lists in the public folder an admin and a vendor, these contain contact information on contrators and vendors. In the folder list I can browse down and few and click on a contact to send them an email, but when I open a new email to send and I click on to and what to chose the list from the address book drop down box they are not there. How do I set it up so vendors and Admin contact list appear in the drop down box in the contact list? Thank you David ...

Pulling data from separate tabs
When charting in Excel 2002 is there a way to use sets of data from two different tabs within the same worksheet? For example, a spreadsheet contains separate tabs for prior year and current year data. Is there a way to reference the data or label series to pick up data from both? I tried pointing and clicking, and then typing the following as a reference for the axis labels: ='Prior Year'!$B$110:$M$110,'Current Year'!'$B$110:$M$110 but receive an error that I'm referring to an external worksheet. I've used the comma (') in the past to reference breaks ...

How do I Remove a Split from my Comments in Excel 2003? #2
I have set my current workbook to split/freeze the first column and first 2 rows. Now, when I add a comment to the second row (in any column) my comments are cut off if I should scroll down. I don't ever remember the behavior before. And I don't know what I've done to enable it but it's really annoying. How do turn this off ? ...

learning Excel #3
Hi, I was considering learning Excel as an additional tool for my data analysis work. Is it better to use data sets that I have previously used with SPSS and apply the same analysis tools as in SPSS? For applying the appropriate tools, I was considering using excel's online help. The second option I have is to use some excel book for data analysis and apply the techniques to data sets provided with the book. Any suggestions????? regards Metal ...

unable to paste Excel 2003 chart into Outlook 2003
(This was posted on "excel.charting" group.) I have a user who's unable to paste an Excel 2003 chart into Outlook 2003 email message. In Outlook options, the checkbox is selected for "Use Microsoft Office Word 2003 to edit e-mail messages". When I tested this on my own computer running the same version of Office, if the box is check, I have no problem pasting; if this box is cleared, I cannot paste. But on his computer, it doesn't work regardless. Thanks and regards, TL ...

IF FUNCTION #14
he following formula: =IF(B3=8,IF(B7=16,(B6*12/16)+(3*B8)+(4*B9)+(8*B10),(IF(B7=24,(B6*12/24)+(3*B8)+(4*B9)+(B10*8),0)))) Works well if the first condition B3=8 is met and returns the correct value. The problem is that when that condition is not met the formula returs FALSE, I want it to print 0. Every option I have tried has failed. The error always says to many arguments have been entered. Thanks in advance for any help. Have you tried =b6*12/b7 -- Don Guillett Microsoft MVP Excel SalesAid Software dguillett1@austin.rr.com "Gulfman100" <Gulfman100@discussions.microsoft....

Excel corrupts when asking to update vlookups
We are experiencing weird behavior with some Office 2K3 Excel spreadsheets that contain lots of calculations, but no macros. On some pc’s Excel acts normally, on others you get the error. I have a couple of screen shots available. Any help is appreciated. If desired, send your file to my address below. I will only look if: 1. You send a copy of this message on an inserted sheet 2. You give me the newsgroup and the subject line 3. You send a clear explanation of what you want 4. You send before/after examples and expected results. -- Don Gu...

Uninstall of mappoint has caused errors with excel
Hi, I am running Office 2003 on the terminal server (windows 2003) and had a copy of mappoint as well. This is a mapping program. We ininstalled mappoint which has caused an error message with Excel and other office products. The error says "Cd:\documents and settings\administrator.ocrdc1\application data\microsoft\addins c:\Program files\common files\microsoft shared\geography\mpoai9.dll is not a valid add-in." I then click OK and excel opens up and everything is fine. The problem is that we are using other programs as well such as Quickbooks that export to excel and t...

Excel VBA
When you select the autofilter, the drop down list is created from the unique data in that column. Is there any way to customize this list, so the changes are permanent? For instance, I might have in one(1) column the following 4 row entries: red, blue, green (all are single cell entries) red, blue red blue, green I want my autofilter drop down list to read: red instead of red, blue, green blue red, blue green red blue, green (like normal) If I chose red from the drop down list...

Problem with named range for a large spreadsheet in Excel 2007
Hello, I am trying to generate a large Excel spreadsheet apprx. 10000 rows and 40 columns. I am generating defined name section in the Workbook.xml part of the XLSM package. Here is a sample entry from that section <definedName name="_._44802_._0_._0_._0_._top_line" localSheetId="0" hidden="1">Sheet1!$B$2</definedName> Although the generation goes fine, I can not open the spreadsheet as the Excel throws an error message saying the package is corrupt. But this is not the case if the spreadsheet is small say, 200 rows by 10 columns. ...

how do I add error bars to a 3D chart in excel?
The help states you can only add error bars to data series in 2D area. Is there a way to add them to a 3D chart? Hi, I would not have thought so. Obviously as it is not a built-in option the only way would be a work around perhaps using dummy series. Unfortunately you can create 3d combination charts. Stick with the 2d view. Cheers Andy elahe wrote: > The help states you can only add error bars to data series in 2D area. Is > there a way to add them to a 3D chart? -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info I checked, and error bars are not offered for 3D ch...

predict future data
Is there a way to create an XY line graph wih plotted data, yet leave room to predict future data on the axes? I can get the graph, but the x and y axes stop at the last data points, and I want those axes continued so that the existing data can be examined and future data predicted and plotted on the same graph, but I am not sure how to accomplish this. Any suggestions would be appreciated. Thanks. Jeff 1) Click on data series in chart, use Add trendline; in Option tab specify some units forward OR 2) Read Help about TREND and FORECAST, and SLOPE and INTERCEPT OR 3) Get crystal bal...

q Emailing Excel Sheet With Outlook
I am trying to send a table from Excel within the body of an Outlook (lastest versions) to be sent as a fax. Am able to do this, BUT when the document prints out on the fax machine the formating is off (too big for the sheet). I am flexible on changing the method I send it to the fax machine, however it must be sent to the fax via macro. Below is the code I am using. Any help would be greatly appreciated. David Public Sub DoIt() 'On Error GoTo Handler Dim EmailAddress(0 To 2) As String Dim Count As Integer Dim N As Integer Dim sRec1(0) As String Dim sRec2(0 To 1) As...

I need to print a word in PDF from excel.
Hi, In my excel Macro, I update several values and then open a word linked with that excel. Finally what I need to do is to print that word to PDF. I already have a PDF Printer, so I just need the code to do it. Can anybody help me? Thanks in advance. Gast=F3n. Habilita la impresora predeterminada como la PDF y ya lo puedes imprimir a al formato deseado Gracias Francisco,=20 Tienes alg=FAn codigo para ello? gracias Repitiendo: Desde el panel de impresoras asigno primero la que me interesa y despues ejecuto mi macro desde el archivo excel asignando la instruccion sig: midefaultes = a...

How do I get Excell to sort dates that range from 1800 to 1900's
I have posted a cemetery survey on Excell spreadsheet. When I try to sort the birth dates or death dates in ascending or descending order the range of 1900 dates will sort but the 1800 dates fall after the 1900 and will not sort. Why? Is this inherit with this program? The WinXL default dates start with 31 December 1899, so earlier "dates" are interpreted as Text. You can use helper columns and text functions (LEFT(),RIGHT(),MID()) to put the Year, Month and Day in separate columns, then sort. Take a look here for additional workarounds: http://j-walk.com/ss/excel/files...