Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I am observing some weird behaviour with VLOOKUP.
Let me explain what happens: In A1:A5 I have some codes CCa CCb CCc CCa CCc In C1:E3 I have a range that shows how they should be grouped together: CCa Fab CCb Adm CCc Fab (that is, CCa and CCc belong to the Fab group while CCb belongs to the Adm group) I want to count the number of codes that fall under the, say, Fab group. My array formula in F1 is: ={SUM(IF(VLOOKUP(A1:A5,C1:E3;2)="Fab";1;0))} but it gives me the answer 1, which is obviously wrong. However, if I input the same formula in H1:H5 (one single array formula in the 5 cells) the I get 4 in each of the cells, which is correct. I have followed how the formulas are evaluated by means of the "evaluate Formula" icon and I simply think that VLOOKUP is misbehaving. Or alternatively, we could say that it has been poorly designed. Am I doing anything wrong? What formula should I use in F1? Thank you Vicente Soler |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP | Excel Discussion (Misc queries) | |||
Problem with VLookUp Function | Excel Worksheet Functions | |||
HOW DO I NEST THE VLOOKUP FUNCTION WITH THE LEFT FUNCTION | Excel Worksheet Functions | |||
how do I write a vlookup function within an iserror function so t. | Excel Worksheet Functions | |||
Vlookup Function Problem | Excel Worksheet Functions |