Quote Originally Posted by bobkap View Post
I have a column of data with characters to both the left and right of a hyphen. I only want to read the information to the left of the hyphen. Yes, I could separate with text-to-columns but I don't want to separate the field. What VBA code would enable me to accomplish this? The field of data varies in length from record to record.
You do not say what you want to do with the text to the left of the hyphen, only that you want to "read" it. Do you want to put the text in the next cell over? Do you want to assign it to a variable within your code? Do you want to read in all of the text in all of the cell in the column into an array? Do you want to modify the text within its own cell so that only the text to the left of the hyphen remains? Something else?