formatXYZ_varToIndex - returns index counting from 0 (or -1 if no variable)