Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
The code below works for Integer cel.values, but not for broken values. I think it has something to do with countrysettings, in Belgium we use comma's to represent broken numbers. In the debugger I see that VBA builds the formula like this: =Int($i$1 * 3.2) but Excel using my countrysettings expects this =Int($i$1 * 3,2) and gives a runtime error. Public Sub gewicht() Dim cel As Range, rng As Range With ActiveSheet Set rng = .Range(.Cells(2, 5), .Cells(33000, 5)) i = 2 For Each cel In rng If cel.Value < "" Then cel.Offset(0, 5).Formula = "=int($i$1 * " & cel.Value & ")" End If i = i + 1 Next End With End Sub Any help appreciated Ward |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can I have the right formula to list all my agencies under country | Excel Worksheet Functions | |||
typing 'Up Country' ends up as Up Country' ? | Excel Discussion (Misc queries) | |||
VBA formula building | Excel Programming | |||
When building formula in excel, it would be very useful to have t. | Excel Programming | |||
When building formula in excel, it would be very useful to have t. | Excel Programming |