MixedUpExcel
Board Regular
- Joined
- Apr 7, 2015
- Messages
- 218
- Office Version
- 365
- Platform
- Windows
Hi All,
I don't know if this has been answered as I don't know how to word the question.
I want to put some code together which will do the following:
Put the code in Cell A1
I can do the above, however, I want to fix the namedrange within the code as it will always be the same.
<tbody>
</tbody>
The data in Cell B1 will be one of the Reps and I want to run the Macro to automatically insert the Region into Cell A1.
How do I store the namedrange within my code? And then make sure that my vlookup calls that data correctly?
Thanks in advance.
Simon
I don't know if this has been answered as I don't know how to word the question.
I want to put some code together which will do the following:
Put the code in Cell A1
Code:
vlookup(B1,namedrange,2,0)
I can do the above, however, I want to fix the namedrange within the code as it will always be the same.
REP NAME | REGION |
REP 1 | NORTH |
REP 2 | NORTH |
REP 3 | SOUTH |
REP 4 | SOUTH |
REP 5 | EAST |
REP 6 | EAST |
REP 7 | WEST |
REP 8 | WEST |
REP 9 | WEST |
<tbody>
</tbody>
The data in Cell B1 will be one of the Reps and I want to run the Macro to automatically insert the Region into Cell A1.
How do I store the namedrange within my code? And then make sure that my vlookup calls that data correctly?
Thanks in advance.
Simon