Convert letter to number in Excel and Google Sheets

=COLUMN(INDIRECT(A2&"1"))

A2 = data cell

Check below for a detailed explanation with pictures and how to use formulas in Excel and Google Sheets.