Hi,
In your macro you can insert a column to the right of the look up column in
the second sheet. Then you can run a loop that would populate the new column
with the first six characters of the column to its left:
CELLS(LoopVariable,NewColumnNumber)=LEFT(CELLS(Loo pVariable,NewColumnNumber-1),6)
After the loop you'll need to do a Copy Paste Special... Values to get
rid of the formulas. Then you'll probably need to convert the column to a
number format. I use the text to columns function in my macros.
If you need the specific
VB code for any of these steps, let me know.
"Duncan_J" wrote:
Hi,
I'm trying to do a vlookup in my macro. However spreadsheet one has 6
numbers and the other sheet adds # and letters after the 6 number. Is thier
anyway to get rid of the # and letters after the sixth.
Example:
834543
834543R7
742351
74235112
Thanks,
DJ