回答編集履歴
2
追記
answer
CHANGED
@@ -26,4 +26,33 @@
|
|
26
26
|
|砂糖|g|100|・・・|
|
27
27
|
|塩|g|20|・・・|
|
28
28
|
|小麦粉|g|150|・・・|
|
29
|
-
|水|mL|500|・・・|
|
29
|
+
|水|mL|500|・・・|
|
30
|
+
|
31
|
+
---
|
32
|
+
<追記>
|
33
|
+
無茶ぶりには同情しますが、さすがにゼロから全部作ってさしあげるのはサイトの趣旨から外れるので
|
34
|
+
ヒントにとどめます。
|
35
|
+
|
36
|
+
```VBA
|
37
|
+
Private Sub CommandButton1_Click()
|
38
|
+
|
39
|
+
With ThisWorkbook.Worksheets(1).UsedRange
|
40
|
+
Dim i
|
41
|
+
For i = 3 To .Columns.Count
|
42
|
+
If .Cells(1, i) = Me.TextBox1.Text And .Cells(2, i) = Me.TextBox2.Text And .Cells(3, i) = Me.TextBox3.Text And .Cells(4, i) = Me.TextBox4.Text Then
|
43
|
+
Me.ComboBox1.SelText = .Cells(6, 1)
|
44
|
+
Me.ComboBox2.SelText = .Cells(6, 2)
|
45
|
+
Me.ComboBox3.SelText = .Cells(6, i)
|
46
|
+
Me.ComboBox4.SelText = .Cells(7, 1)
|
47
|
+
Me.ComboBox5.SelText = .Cells(7, 2)
|
48
|
+
Me.ComboBox6.SelText = .Cells(7, i)
|
49
|
+
Exit Sub
|
50
|
+
End If
|
51
|
+
Next
|
52
|
+
|
53
|
+
MsgBox "新規登録"
|
54
|
+
|
55
|
+
End With
|
56
|
+
End Sub
|
57
|
+
|
58
|
+
```
|
1
追記
answer
CHANGED
@@ -11,4 +11,19 @@
|
|
11
11
|
|砂糖|g|100|・・・|
|
12
12
|
|塩|g|20|・・・|
|
13
13
|
|小麦粉|g|150|・・・|
|
14
|
+
|水|mL|500|・・・|
|
15
|
+
|
16
|
+
---
|
17
|
+
|
18
|
+
<追記> あ、こんな感じ?
|
19
|
+
|A|B|C|D|
|
20
|
+
|:--|:--|:--|:--|
|
21
|
+
|客先名|-|A様|B様|・・・||
|
22
|
+
|品名1|-|ピザ|・・・|||
|
23
|
+
|品名2|-|マルゲリータ|・・・|||
|
24
|
+
|グレード|-|Lサイズ|・・・|||
|
25
|
+
|<原材料>|<単位>
|
26
|
+
|砂糖|g|100|・・・|
|
27
|
+
|塩|g|20|・・・|
|
28
|
+
|小麦粉|g|150|・・・|
|
14
29
|
|水|mL|500|・・・|
|