PanzerRanger
New Member
- Joined
- Jan 3, 2018
- Messages
- 20
Using Excel 2013
If Im runing the code below in a for loop then comb works fine.
For Each c In Range("B2:B10") 'ersätt range
nr = Right(c, 3)
If nr = 980 Then
unr = c.Offset(0, -1)
se = c.Offset(0, 0)
comb = unr & " Sektion" & " " & se
Range("c4") = comb
End If
Next
but if comb looks like this
comb = unr & " Sektion " & se or comb = unr &" " & "Sektion" & " " & se
it generates a Type error 1004, but I need the spaces, any help because Im stuck out here
Many thanks
If Im runing the code below in a for loop then comb works fine.
For Each c In Range("B2:B10") 'ersätt range
nr = Right(c, 3)
If nr = 980 Then
unr = c.Offset(0, -1)
se = c.Offset(0, 0)
comb = unr & " Sektion" & " " & se
Range("c4") = comb
End If
Next
but if comb looks like this
comb = unr & " Sektion " & se or comb = unr &" " & "Sektion" & " " & se
it generates a Type error 1004, but I need the spaces, any help because Im stuck out here
Many thanks