Hello,
I can't hardly understand why this is happening to me. Maybe because I'm using a Spanish Office instead of an English one. Anyway, my next piece of code fails.
In excel A1 should be =CONCATENATE(FIXED(6,123456;2);" N") ... Assuming in spanish we use , instead of . as decimal mark.![]()
Sub test() Dim Number As Single Set Wsheet = ActiveWorkbook.Worksheets(1) Number = 6.123456 Wsheet.Cells(1, 1).Formula = "=CONCATENATE(FIXED(" & Number & ",2),"" N"")" Wsheet.Cells(1, 2).Value = Number Wsheet.Cells(1, 3).Formula = "=CONCATENATE(FIXED(RC[-1],2),"" N"")" End Sub
What I'm guetting is =CONCATENATE(FIXED(6;123456;2)" N")... Wich, obviously leads to a #Value error message. Why is excel doing this?
I know I may use another cell to store the value and show the result as in A3. But that's completely lame.
I can't hardly understand why excel behaves like that. Is this behaviour useful anyway? BTW, does anyone know how to avoid this without using a cell to store the value?
NOTE: Checked the code in excel 2002 & 2003.
Bookmarks