=IF(セル="","",WEBSERVICE("https://api.excelapi.org/post/address?zipcode="&セル))
Sub 顧客検索()
UserForm1.Show
End Sub
Sub 帳票クリア()
Range("A4:G4,A5:G5,A6:F7,D18:E44").Value = ""
Range("A1:M2").Select
End Sub
Private Sub 検索_Click()
lastrow = Worksheets("顧客名簿").Cells(Rows.Count, 1).End(xlUp).Row
myData = Worksheets("顧客名簿").Range(Worksheets("顧客名簿").Cells(1, 1), Worksheets("顧客名簿").Cells(lastrow, 6)).Value
ReDim myData2(1 To lastrow, 1 To 6)
For i = LBound(myData) To UBound(myData)
If myData(i, 2) Like "*" & TextBox1.Value & "*" And myData(i, 3) Like "*" & TextBox2.Value & "*" Then
j = j + 1
myData2(j, 1) = myData(i, 1)
myData2(j, 2) = myData(i, 2)
myData2(j, 3) = myData(i, 3)
myData2(j, 4) = myData(i, 4)
myData2(j, 5) = myData(i, 5)
myData2(j, 6) = myData(i, 6)
End If
Next i
ListBox1.ColumnCount = 6
ListBox1.ColumnWidths = "30;60;60;60;80;80"
ListBox1.List = myData2
End Sub
Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
TextBox1.Value = ListBox1.Column(1)
TextBox2.Value = ListBox1.Column(2)
TextBox3.Value = ListBox1.Column(3)
TextBox4.Value = ListBox1.Column(4)
TextBox5.Value = ListBox1.Column(5)
End Sub
Private Sub 反映_Click()
Cells(4, "A") = TextBox3.Text
Cells(5, "A") = TextBox4.Text + TextBox5.Text
Cells(6, "A") = TextBox1.Text
ListBox1.Clear
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
UserForm1.Hide
End Sub
Private Sub クリア_Click()
ListBox1.Clear
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
End Sub
=ROUNDUP(合計セル*100/108,0)
"("#,##0_ ")"
#,##0_ "円"