0

Please when i run this code it works liek charm

Sub drag()
'
' drag Macro
'

'
Dim lastRow As Long, i As Long
Dim ws As Worksheet

    Set ws = Sheets("WIP")

    lastRow = ws.Range("A" & Rows.Count).End(xlUp).Row
    Sheets("WIP").Select
    Range("N2:N" & lastRow).Formula = "=G3&"",""&L3"

End Sub

The problem is that when i want to replace the formula by this one :

=IF(RIGHT(F2;1)="k";"kit";IF(H2="LIM-mètre linéaire";"tissu";"composant"))

i can't run the code please any help :)

Scott Craner
  • 148,073
  • 10
  • 49
  • 81
Yassine
  • 5
  • 1
  • 2
  • Possible duplicate of [How do I put double quotes in a string in vba?](http://stackoverflow.com/q/9024724/11683) – GSerg Sep 29 '16 at 17:03

1 Answers1

0

FIRST try changing your semicolons to commas, then if that doesnt work

try

=IF(RIGHT(F2;1)="""k""","""kit""",IF(H2="""LIM-mètre linéaire""","""tissu""","""composant"""))
Doug Coats
  • 6,255
  • 9
  • 27
  • 49