Marklarbear
Board Regular
- Joined
- Nov 6, 2003
- Messages
- 112
- Office Version
- 365
- Platform
- Windows
Hi Brains Trust
I'm after 2 VBA codes that will do the following in a range of numbers:
VBA 1 - for any value that is 4 characters long, remove the first 2 characters and replace with '9'. ie in cell A2 it will change the value from 9008 to 908, in cell D5 it will change the value from 2399 to 999 and so on.
VBA 2 - for any value that is 2 characters long, add '1' to the start. ie in cell A7 it will change the value from 97 to 197, in cell C4 it will change the value from 32 to 132 and so on.
The end result will be that every cell in the range will have a 3 digit number in it (that will be greater than 100 and less than 1000).
As always - any help is greatly appreciated...
I'm after 2 VBA codes that will do the following in a range of numbers:
VBA 1 - for any value that is 4 characters long, remove the first 2 characters and replace with '9'. ie in cell A2 it will change the value from 9008 to 908, in cell D5 it will change the value from 2399 to 999 and so on.
VBA 2 - for any value that is 2 characters long, add '1' to the start. ie in cell A7 it will change the value from 97 to 197, in cell C4 it will change the value from 32 to 132 and so on.
The end result will be that every cell in the range will have a 3 digit number in it (that will be greater than 100 and less than 1000).
As always - any help is greatly appreciated...