View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
ken4capitola ken4capitola is offline
external usenet poster
 
Posts: 13
Default Error when entering a formula

Thanks Greg,
Sorry for the mistyping of the equation. In this simplistic example, A
and B are names of cells containing values. My suggestion to the user
didn't correct the problem as I think your responses are indicating.

The actual code is shown below. The replace statement is to allow the
code to work on both sides of the Atlantic( "," vs ";" problem). The
statement does work with both listseparators as verified by others. As
above, the names you see are range names containing values that should
be ok.

Any idea how someone could have a Excel setting that would prevent the
assignment not to work.

Dim ListSep As String
Dim BackComma As String
BackComma = "\,"
ListSep = Application.International(xlListSeparator)
...
WKS.Range("AD17") = Replace("=IF(iVO2Min<wVO2MinLow \, wVO2MinLow \,
IF(iVO2Min<wVO2MinHigh \, wVO2MinHigh \, iVO2Min))", BackComma,
ListSep)

Next step is that I've ask to the Austria user to manually enter the
code into the spreadsheet when the VBA error breaks. He will enter
= IF(iVO2Min<wVO2MinLow ; wVO2MinLow ; IF(iVO2Min<wVO2MinHigh ;
wVO2MinHigh ; iVO2Min))

I'm hoping his manually entering will fail because of some Excel
setting. But this is getting out of my league.
Any other ideas?