Hello there! I have a question about the file attached.
Basically, I have to automate a task with VBA, but given that my level is not that advanced I'm struggling to find the best way to do it. Here is what I have to do:
1) Starting from Column E, from cell E2, I usually paste a list of ID codes from another software, whose number is indefinite, it is different every time
2) The same goes for Column D, whose content is coming from another software
3) Then focus on Column A, B and C:
Column A - I need to use the RIGHT function to extract the last 3 digits from the ID code in Column E
Column B - I need to use the LEFT function to extract the first 10 digits from the ID code in Column E
Column C - I would need to extract either CR or DR from the Price Point Key in Column E. The problem is that the structure of the Price Point Key can change for every currency, so I don't know specifically after how many characters I will find CR or DR
Now, for steps 1) and 2) I don't need VBA, while for step 3) I need it. Of course I know how to write the formulas with RIGHT & LEFT in VBA, but I need:
- a way to fill the formulas (RIGHT and LEFT) in Column A and B down to an indefinite number of rows, depending on whether there is content in the cells in Column E
- a way to extract either CR or DR from the Price Point Key in Column D, and fill it down to an indefinite number of rows
I was thinking about using an arbitrary number of rows, like a cap, or to use a loop, but maybe there are other alternatives. Does anyone have any idea?
Thanks a lot in advance for your time!
Bookmarks