I have a code sheet for different digits that is being used for certain calculations. I need to select the entire column based on the first value in the top row. I'm able to select the entire column based on the range but is there a VBA lookup function that looks up for a value specified in it, and compares with the value in defined cell range, and allows us to copy the entire column? Here's what I have done so far:
Columns("F:F").Select
Selection.Copy
Columns("A:A").Select
Selection.Insert Shift:=xlToRight
Suppose I have a value called "string1", so in my case, "string1" is in the address "F1" which is why I have copied the "F" column & pasting it in front of all other columns. Similarly, if the value is changed to "string2" which is at the address "G1" then column "G" needs to be pasted in the front of the sheet.