avadhutd2
08-27-2009, 01:52 AM
Hi,
I have a question regarding the format function.
My requirement to verify an ID and fetch data from another sheet corresponding to that ID.
Hence here I need to format a number which is seen as 1-23456 or (1)23456 to 123456 as that will help me for comparison.
I tried the code below, however that is not giving me the results anticipated.
If (IsNumeric(ActiveSheet.Range("H" & lngCtr))) Then
ActiveSheet.Range("H" & lngCtr) = _
Format(ActiveSheet.Range("H" & lngCtr), "000000")
End If
Can anyone give me further inputs?
Thanks in advance!
I have a question regarding the format function.
My requirement to verify an ID and fetch data from another sheet corresponding to that ID.
Hence here I need to format a number which is seen as 1-23456 or (1)23456 to 123456 as that will help me for comparison.
I tried the code below, however that is not giving me the results anticipated.
If (IsNumeric(ActiveSheet.Range("H" & lngCtr))) Then
ActiveSheet.Range("H" & lngCtr) = _
Format(ActiveSheet.Range("H" & lngCtr), "000000")
End If
Can anyone give me further inputs?
Thanks in advance!