我已经编写了获取空白单元格信息的代码,但问题是我想复制空白调用之前的数据。在空白单元格之后可能有一个值。这是我的代码:
Set rng = Range("6:6").Find(What:=horiz, LookIn:=xlValues, LookAt:=xlWhole)
If rng Is Nothing Then
MsgBox "Value not found in row 1", vbExclamation
Else
rng.EntireColumn.Copy
Range("p1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
MsgBox Range("C1").End(xlDown)(2, 1).Value