首页 > 其他分享 >STATA CFPS变量列表导出到EXCEL整理

STATA CFPS变量列表导出到EXCEL整理

时间:2023-02-17 22:23:34浏览次数:39  
标签:CFPS Dim End Sub EXCEL Value Next Range STATA

Sub CheckTableCells()
Application.DisplayAlerts = False
Dim sht As Worksheet
   Dim i, j As Integer

For i = 1 To 284

If (Range("e" & i).Value = "") Then
  If (Range("a" & (i + 1)).Value = "") Then
  If (Range("b" & (i + 1)).Value <> "") Then
  If (Range("c" & (i + 1)).Value = "") Then
   Range("e" & i).Value = Range("b" & (i + 1)).Value
   Rows(i + 1).Delete
   End If
   End If
   End If
   End If
Next
End Sub
Sub CheckTableCells1()
Application.DisplayAlerts = False
Dim sht As Worksheet
   Dim i, j As Integer

For i = 1 To 539

If (Range("e" & i).Value = "") Then
  If (Range("d" & (i)).Value <> "") Then
   Range("e" & i).Value = Range("d" & (i)).Value
   Range("d" & i).Value = ""
   End If
   End If
Next
End Sub

 

标签:CFPS,Dim,End,Sub,EXCEL,Value,Next,Range,STATA
From: https://www.cnblogs.com/xkdn/p/17131627.html

相关文章