View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Auto conversion of the Text to Number Getting Failed in Excel 2007


MyNum = trim(Range("A1"))
if not Isnumeric(MyNum) then
MyNum = Val(MyNum)
end if


"Yuvaraj Mani" wrote:

Auto Conversion of Text to Number is getting failed in excel 2007:

Number values from the Spreadsheet formatted as Text instead of Number that
leads to Type mismatch error in VBA Program.

How to auto convert the Number values in the excel cells to Number instead
of Text