![](/img/trans.png)
[英]select a range to copy and paste in another cell if a condition is met
[英]How to copy cell if condition is met and paste in another cell?
我完全被困住了,需要有人提供一些新代碼,因為我什至還沒有弄清楚這一點。 我需要做兩件事。
對於 #1,在 D2 中放入
=IF(M2>0,M2,"")
然后單擊並向下拖動整個列
然后在F2放
=IF(M2>0,"FALSE","TRUE")
然后單擊並向下拖動整個列(假設“TRUE”是其中的其他內容。
在 VBA 中,這是一種方法:
For i = 2 to ActiveSheet.UsedRange.Rows.Count
If Range("M"&i).Value > 0 Then
Range("D"&i).Value = Range("M"&i).Value
Range("F"&i).Value = "FALSE"
Next i
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.