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: 6
Default text conversion problem

The following code steps through a range, tests an extracted value, and
either deletes the row or writes the test value in column 1 as a text value.

For r = lastrow To 8 Step -1
tst = Left(impt.Cells(r, 2), 9)
If Application.CountA(Rows(r)) = 0 Or IsNumeric(tst) = False Then
Rows(r).Delete
Else
impt.Cells(r, 1) = WorksheetFunction.Text(tst, 0)
End If
Next r

The problem is that the values written to the cells reference "cells(r,1)"
is a numberic value, not text. (The str() function gives the same result.)
I can achieve my objective if I run a new for...next loop on the extracted
values after the above routine has completed, but why is that necesssary?
Why will the conversion function not work as intended in the first loop?

DM

 
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
Problem in Conversion of Excel to Text(Tab delimated) Sagar Excel Discussion (Misc queries) 1 March 22nd 10 12:17 PM
Timing Conversion problem Help on Excel sheet formula Excel Discussion (Misc queries) 4 April 4th 07 01:01 PM
Conversion problem Keithp Excel Discussion (Misc queries) 0 January 4th 07 11:01 AM
Problem in Conversion usm Excel Discussion (Misc queries) 1 June 17th 06 05:32 PM
Excel Text Conversion Problem Michael D Excel Discussion (Misc queries) 0 March 14th 06 12:26 AM


All times are GMT +1. The time now is 02:08 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"