View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Shahin Musayev Shahin Musayev is offline
external usenet poster
 
Posts: 18
Default Rnd() 1004 error

Finally the problem is solved.

Thing is that colleague has regional settings that differ from US
English: comma for decimal symbol and dot for digit grouping.
It appears that Rnd() return is in local format (decimal symbol -
comma!!!), while Cells(x,y) = or Cells(x,y).Formula expects formula to
be entered in US English.

The solution is simple: add .FormulaLocal where applicable :)

BTW Previous solution with WorksheetFunction.RandBetween also didn't
work. I was misinformed by my colleague.

Hope this will be useful.

Regards,
Shahin