Hacker News new | ask | show | jobs
by mistermann 3955 days ago
Now try doing a VLookup using more than one column.

Artificial limitations like this are one reason people rightfully hate Microsoft.

1 comments

The so-so way: use MATCH in one column to get the row numbers, INDEX in one column for each column you want to pull in to actually grab them using that row number. Alternative: join the tables using Power Query so you could have it refresh and give you the combined version even after adding more columns.

I mean, point taken, but in case you were wondering, then yeah. VBA also does SQL operations on Excel tables, but that's, well, worse.

> VBA also does SQL operations on Excel tables, but that's, well, worse.

Are you sure about that? Afaik it doesn't but I may be mistaken.

Yeah, it could be done using the ADODB interface on data in the workbook itself rather than from some actual DB. See this link for an example: http://stackoverflow.com/a/26678696/1502035 That being said, when I encountered someone doing this I was pretty surprised as well.
Pretty wild - it would be nice if MS would put a little effort into their cash cows now and then so people wouldn't have to resort to such things though.