我的电子表格中列中的单元格尚未填充。我的vba设置为从用户表单中搜索匹配值,并填充与匹配的唯一标识符对应的数据。它在填充所有字段时起作用,但不能用空白字段起作用。如何修改以忽略空白单元格?
Private Sub SearchButtonSubmission_Click()
row_number = 0
Do
DoEvents
row_number = row_number + 1
item_in_review = Worksheets("LiveTrackerSheet").Range("U" & row_number)
If item_in_review = SubmissionIDSearchBox.Text Then
POIDSearchBox.Text = Worksheets("LiveTrackerSheet").Range("P" & row_number)
CampaignIDSearchBox.Text = Worksheets("LiveTrackerSheet").Range("N" & row_number)
CampaignStartbox.Text = Worksheets("LiveTrackerSheet").Range("L" & row_number)
CampaignEndBox.Text = Worksheets("LiveTrackerSheet").Range("M" & row_number)
MSEorRallyIDBox.Text = Worksheets("LiveTrackerSheet").Range("W" & row_number)
CreativeLaunchBox.Text = Worksheets("LiveTrackerSheet").Range("V" & row_number)
NextSubmissionBox.Text = Worksheets("LiveTrackerSheet").Range("X" & row_number)
IABox.Text = Worksheets("LiveTrackerSheet").Range("Y" & row_number)
SourceORGenCodeBox.Text = Worksheets("LiveTrackerSheet").Range("Z" & row_number)
EEPBox.Text = Worksheets("LiveTrackerSheet").Range("AA" & row_number)
BEQBox.Text = Worksheets("LiveTrackerSheet").Range("AB" & row_number)
BonusIDBox.Text = Worksheets("LiveTrackerSheet").Range("AC" & row_number)
PricingCodeBox.Text = Worksheets("LiveTrackerSheet").Range("AD" & row_number)
GizmoCodeBox.Text = Worksheets("LiveTrackerSheet").Range("AG" & row_number)
DARTCodeBox.Text = Worksheets("LiveTrackerSheet").Range("AH" & row_number)
MOFIDBox.Text = Worksheets("LiveTrackerSheet").Range("AI" & row_number)
EIDBox.Text = Worksheets("LiveTrackerSheet").Range("AJ" & row_number)
RAFCampaignIDBox.Text = Worksheets("LiveTrackerSheet").Range("AK" & row_number)
ReferTypeBox.Text = Worksheets("LiveTrackerSheet").Range("AL" & row_number)
RAFProductRankBox.Text = Worksheets("LiveTrackerSheet").Range("AM" & row_number)
PMCCodeBox.Text = Worksheets("LiveTrackerSheet").Range("AN" & row_number)
SPIDNumberBox.Text = Worksheets("LiveTrackerSheet").Range("AO" & row_number)
WOCIDBox.Text = Worksheets("LiveTrackerSheet").Range("AP" & row_number)
URLBox.Text = Worksheets("LiveTrackerSheet").Range("AQ" & row_number)
OwnerEmailBox.Text = Worksheets("LiveTrackerSheet").Range("AT" & row_number)
EEPConBox.Text = Worksheets("LiveTrackerSheet").Range("AR" & row_number)
EEPConInitialsBox.Text = Worksheets("LiveTrackerSheet").Range("AS" & row_number)
PrevPOIDBox.Text = Worksheets("LiveTrackerSheet").Range("AF" & row_number)
End If
Loop Until item_in_review = ""
End Sub