目前,我正在将一些数据复制到另一个工作表中,但需要在我的if函数中输入多个条件-在我的工作簿中,列H有巧克力、草莓、香草-我只想将巧克力和草莓移到下一个工作表。到目前为止,
If Sheets("Sheet1").Cells(i, "H").Value = "chocolate" 如果列H有巧克力或草莓,我如何告诉VBA移动整行?我试过了-
If Sheets("Sheet1").Cells(i, "H").Value = "chocolate" Then
ElseIf If Sheets("Sheet1").Cells(i, "H").Value = "strawberry"但它最终只保留了草莓行。
发布于 2016-09-12 02:49:56
将其用于您的vba If语句。
If Sheets("Sheet1").Cells(i, "H").Value = "chocolate" Or Sheets("Sheet1").Cells(i, "H").Value = "Strawberry" Then
...
Your code
End Ifhttps://stackoverflow.com/questions/39439435
复制相似问题