简体   繁体   English

VBA拖动公式直到最后一行

[英]VBA Dragging formula until the last row

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 :) 我无法运行代码,请任何帮助:)

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"""))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM