VLOOKUP doesn't work in an array formula, apparently

larryk

New Member
Joined
Dec 30, 2005
Messages
3
I have a list of eight text items and their respective numerical values in A2:B9. There are duplicates in the item names and I am looking for value totals for some items (which I have calculated using SUMIF).

Now I would like a total of all things that I haven't got totals for (i.e. "all the rest"). I can do this in two steps by doing a bunch of =ISNA(VLOOKUP(A2,$A$11:$A$12,1,FALSE)) in column D (where A11 and A12 contain the text items that i have already counted), and then a =SUMIF(D2:D9, TRUE, B2:B9) to find the total but I'd like to do it in one step.

I read about array formulas and constructed the following but it doesn't seem to work: {=SUM(IF(ISNA(VLOOKUP(A2:A9, A11:A12, 1, FALSE)), B2:B9))}. Is my syntax wrong? Or is it because VLOOKUP uses an array as an argument anyway and that's getting messed-up by the array formula processing, or something?

I can post the example worksheet if you like (and if someone can point me to the nice web-worksheet html).

Any help much appreciated,
Larry

P.S. I did it in an array formula with a nasty CONCATENATE hack but when I transfer this to my real spreadsheet if there are any substrings or overlap then the numbers may be wrong. I'd like to do it "properly" :)

{=SUM(IF(ISERROR(FIND(A2:A9,CONCATENATE(A11,A12))),B2:B9))}
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
larryk said:
Now I would like a total of all things that I haven't got totals for (i.e. "all the rest").

How many criterias? Couldn't you use a not equal too?

=SUMIF(A1:A10," <> Criteria",B1:B10)
 
Upvote 0
Thanks, yes that is a solution to the example problem...

...but not an answer to my question. As soon as I transfer this back into my spreadsheet it becomes a lot more complicated.

I need to work out how to sumif where the criteria is that the text value being compared is not in a certain list.

Can you tell me why the vlookup doesn't work in {}?

Cheers,
Larry
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,255
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top