Abstracts the process of finding a column index into a reusable function