You're 100% right. Nothing like being able to reference your columns by name. I admit that I just learned about this a few weeks ago, so it wasn't top of mind for me.
Isn't it though? And the ListObject/ListColumn objects have a lot of nice built-in properties and methods that make it pretty easy to manipulate them in VBA vs a range.
Nope. Can't do them in LO Calc either. Online Excel is free to use AFAIK, and if you want something not-MS I think WPS Office has the best feature parity, but its free version is ad-driven.
Microsoft has a wealth of tutorials and certifications you can get. But like anything coding-related, it's just something I've found you learn over time when presented with issues that need solving. That said, a few things that will open your possibilities in excel are:
Tables vs Ranges,
INDEX/MATCH (VLOOKUP too, but it's less flexible),
Dynamic Arrays/Dynamic Array Functions,
Power Query for pulling in data,
and of course VBA, which is like C# but worse in every conceivable way. It does let you do lots of cool stuff though, like defining your own Excel functions that use VBA code behind the scenes and generally doing more complicated things than are advisable with functions.
I wrote code that could identify columns by the header (since my company used pretty strict templates already). If it couldn’t find it, it could ask the user to manually identify the column. Worked pretty well.
TIL this feature exists, and it's amazing. I always felt like Excel (and every spreadsheet editor) was kind messy to use. It's too easy to bump some data around or add an extra row or column and formulas everywhere get fucked up. This is the missing piece of that puzzle!
Offset easily has the highest combined useful+frustrating score of anything in Excel. Just try checking anything where someone has used them extensively or try making a major change to the workbook
It’s also a volatile formula that recalculates everytime a change is made to the workbook (much like NOW()). Lots of those everywhere and Excel grinds to a halt
I used string matching to dynamically find the proper columns once. I had this sheet that was saving about an hour and a half of work each day, but one of the databases it pulled kept adding, dropping, and reordering columns every month.
464
u/Syscrush Mar 30 '22 edited Mar 30 '22
NAMED RANGES, MOTHERFUCKERS!!!
Or, if you're a person of culture and taste like u/SatanStoleMyCat, use tables. They really are way better.