kashif.special2005
Active Member
- Joined
- Oct 26, 2009
- Messages
- 443
Hi,
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o> </o>
1<SUP>st</SUP> Question:- I am applying loop in cells that if cells value is alphanumeric than convert it into numeric and if cells value is numeric than next loop
<o> </o>
I am using this code but it is not working
<o> </o>
For j = last_row To 2 Step -1<o></o>
<o> </o>
cell_value = Cells(last_row, 1).Value<o></o>
<o> </o>
If IsNumeric(cell_value) = True Then
Next j<o></o>
Else<o></o>
Cells(last_row, 1).Value = Value(Trim(Mid(Cells(last_row, 1), Cells(last_row, 1), Len(Cells(last_row, 1))), Cells(last_row, 1)))<o></o>
End If<o></o>
Next j
<o> </o>
<o> </o>
2<SUP>nd</SUP> Question:-<o></o>
<o> </o>
'Range("H2:H" & last_row).Formula = "=Value(TRIM(IF(ISTEXT(A2),MID(A2,2,LEN(A2)),A2)))"
<o> </o>
When I am applying above formula it is working fine, but when I am applying below formula it is giving me an error.
<o> </o>
Please help<o></o>
<o> </o>
'Range("H2:H" & last_row).Value=application.WorksheetFunction.TRIM(IF(ISTEXT(A2),MID(A2,2,LEN(A2)),A2))
<o> </o>
<o> </o>
Thanks,
Kashif.<o></o>
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o> </o>
1<SUP>st</SUP> Question:- I am applying loop in cells that if cells value is alphanumeric than convert it into numeric and if cells value is numeric than next loop
<o> </o>
I am using this code but it is not working
<o> </o>
For j = last_row To 2 Step -1<o></o>
<o> </o>
cell_value = Cells(last_row, 1).Value<o></o>
<o> </o>
If IsNumeric(cell_value) = True Then
Next j<o></o>
Else<o></o>
Cells(last_row, 1).Value = Value(Trim(Mid(Cells(last_row, 1), Cells(last_row, 1), Len(Cells(last_row, 1))), Cells(last_row, 1)))<o></o>
End If<o></o>
Next j
<o> </o>
<o> </o>
2<SUP>nd</SUP> Question:-<o></o>
<o> </o>
'Range("H2:H" & last_row).Formula = "=Value(TRIM(IF(ISTEXT(A2),MID(A2,2,LEN(A2)),A2)))"
<o> </o>
When I am applying above formula it is working fine, but when I am applying below formula it is giving me an error.
<o> </o>
Please help<o></o>
<o> </o>
'Range("H2:H" & last_row).Value=application.WorksheetFunction.TRIM(IF(ISTEXT(A2),MID(A2,2,LEN(A2)),A2))
<o> </o>
<o> </o>
Thanks,
Kashif.<o></o>