I'm trying to sum the first N elements in a column, where N is a value in another cell. I've come up with this:
Where A10 contains N. But I don't want to have to hardcode the column label in the concatenation, because I want it to continue to function if I move columns around. I tried using the
column() function, but it returns a number, not a letter. I tried
=char(code("A") + column() - 1)
but this fails once the column gets to
AA, and I'm at
AK already. I could put a modulo-26 test in there, but I figure there has to be an easier way to get the column letter code, or to do a variable sum.
I'm using Apple Numbers, but the formulae in Numbers, Excel, LibreOffice, etc., all seem to be fairly similar, so if you have suggestions that work for other spreadsheets, please don't hold back.