Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problem in Conversion of Excel to Text(Tab delimated) | Excel Discussion (Misc queries) | |||
Timing Conversion problem | Excel Discussion (Misc queries) | |||
Conversion problem | Excel Discussion (Misc queries) | |||
Problem in Conversion | Excel Discussion (Misc queries) | |||
Excel Text Conversion Problem | Excel Discussion (Misc queries) |