Convert roman number to number in Excel and Google Sheets

=MATCH(A2,INDEX(ROMAN(ROW(INDIRECT("1:4000"))),0),0)

A2 = data cell

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