Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all
I am reading a text code (12 characters) taking the middle four characters and need to re-output them to a certain place in the spreadsheet. This has to be done programatically, since other calculations are used and decisions made whether the code is needed or not (ie i cannot use a formula on the worksheet or formatting to resolve this issue). Example code would be "AB2101054321" and "AB2099054321" now, in vb, I read the codes in using a variable (declared as a string) then take the 4 characters, starting four from the left ie mid(code,4,4) to subsequently re-output (if necessary) to a cell in a spreadsheet. The problem I am encountering is that for the first code, it works fine - ie 1010, but the second comes out as 990 when using activecell.value. I need the output as text to be 0990. Can anyone help with this please? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can Text Function change output text color? | Excel Discussion (Misc queries) | |||
Output text from numbers | Excel Worksheet Functions | |||
How to output text that blinks? | Excel Discussion (Misc queries) | |||
VBA output to text editor | Excel Programming | |||
output text | Excel Programming |