where x is an increasing variable which is within a for - next loop. Every time the loop happens then MyRequiredString may be different depending on where the cell (x,5) is on sheet 2. i need to use MyRequiredString in sheet 1 (which is the active sheet) [or more accurately to use these 3 characters as a condition in an "If" statement within the script for use on Sheet 1]
To put it another way, if cell (x,5) on sheet 2 is "abcdef", I want MyRequiredString to be "def"
Im sure this is a one line code, but can I work it out???
Any help would be greatly appreciated.
Using the last few characters on a different sheet
You need to retrieve the value from the range/cell and then take the last 3 characters from it.
You were trying to put the last 3 characters of the cell as a value for the range which is not a valid value for it.