View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tim Childs[_4_] Tim Childs[_4_] is offline
external usenet poster
 
Posts: 31
Default Help on Code Snippet Error {Val function}

Jo
thanks for your help
Tim

"joeu2004" wrote in message
...
After-thought.... I wrote:
Val(Replace(LTrim(RTrim(.Cells(iFirstDataRow, iTestCol))," ",","))


RTrim is not necessary. Simply:

Val(Replace(LTrim(.Cells(iFirstDataRow, iTestCol))," ",","))

(Hmm, also corrects a copy-and-paste typo in the original expression.)