LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Text output

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can Text Function change output text color? epiekarc Excel Discussion (Misc queries) 1 December 31st 08 02:58 AM
Output text from numbers LiAD Excel Worksheet Functions 7 December 10th 08 01:51 PM
How to output text that blinks? ZHonorable Excel Discussion (Misc queries) 1 October 28th 06 10:24 AM
VBA output to text editor stuart Excel Programming 3 August 7th 05 11:31 PM
output text ktokuo Excel Programming 1 April 9th 04 03:06 AM


All times are GMT +1. The time now is 01:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"