Hello....
Please help.....
I don't know what's wrong with this code.
Range("D6:G6").Select
Range("D6:G" & Range("F" & Rows.Count).End(xlUp).Row).Select
At this part, it ended up selecting A6:G39. Even though column F last row is F8.
There's no merge cells in all columns D to G.
Please help.....
I don't know what's wrong with this code.
Range("D6:G6").Select
Range("D6:G" & Range("F" & Rows.Count).End(xlUp).Row).Select
At this part, it ended up selecting A6:G39. Even though column F last row is F8.
There's no merge cells in all columns D to G.
Excel Formula:
Sub CopyData()
Sheets("Search").Select
Range("D6:G6").Select
Range("D6:G" & Range("F" & Rows.Count).End(xlUp).Row).Select
Sheets("NextPO").Select
Range("C" & Rows.Count).End(xlUp).Offset(1, 0).Select
Application.ScreenUpdating = True
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Sheets("Search").Select
End Sub
先日付確認用-test.xlsm | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | ||||||
3 | Delivery address | Item | Qty | Check | |||||||||
4 | |||||||||||||
5 | Search by Phone No -→ | DAB01165 | |||||||||||
6 | Company A | DAB01165 | 1 | GL43 | 10 | ||||||||
7 | 2 | GL44 | 10 | ||||||||||
8 | 3 | JT05 | 5 | ||||||||||
9 | |||||||||||||
10 | |||||||||||||
11 | |||||||||||||
12 | |||||||||||||
13 | |||||||||||||
14 | |||||||||||||
15 | |||||||||||||
16 | |||||||||||||
17 | |||||||||||||
18 | |||||||||||||
19 | |||||||||||||
20 | |||||||||||||
21 | |||||||||||||
22 | |||||||||||||
23 | |||||||||||||
24 | |||||||||||||
25 | |||||||||||||
26 | |||||||||||||
27 | |||||||||||||
28 | |||||||||||||
29 | |||||||||||||
30 | |||||||||||||
31 | |||||||||||||
検索 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
F5 | F5 | =IF(AND(C5<>"",D6<>""),"検索条件を修正してください",IF(C5<>"",VLOOKUP(SUBSTITUTE(TRIM(C5),"-",""),得意先及び直送先!U:V,2,FALSE),D6)) |
A6 | A6 | =IF(D6="","",VLOOKUP(D6,得意先及び直送先!A:K,2,FALSE)&VLOOKUP(D6,得意先及び直送先!A:F,3,FALSE)) |
Cells with Conditional Formatting | ||||
---|---|---|---|---|
Cell | Condition | Cell Format | Stop If True | |
F5 | Cell Value | contains "検索" | text | NO |
A6 | Cell Value | contains "様" | text | NO |