How can I get the letter column names in Excel in code? I want to apply a formula (SUM) to a range of cells in a row, but I can't use the Cells property because that takes integers, so instead of B8 i get 28.
I don't know all the columns in advance (varies by client), so I can't hardcode it. I can think of awkward ways -adding 65 & taking the ASCII value, creating an array of letters, etc, but it seems like there ought to be a better way - column.name or something. Thanks.




Reply With Quote