EXCEL TOOLS
Excel Add-ins ที่พัฒนาโดยคุณสันติพงศ์ ณสุย (MVP Excel 2010-2020) ด้วยภาษา C# เพื่อแก้ไขปัญหาไฟล์ใหญ่ คำนวณนาน ทำงานช้า จัดการข้อมูลต่าง ๆ ที่ทำงานประจำวันได้อย่างสะดวกรวดเร็ว สนใจคลิกไปดูได้ที่นี่ครับ => Excel Tools
Excel Add-ins ที่พัฒนาโดยคุณสันติพงศ์ ณสุย (MVP Excel 2010-2020) ด้วยภาษา C# เพื่อแก้ไขปัญหาไฟล์ใหญ่ คำนวณนาน ทำงานช้า จัดการข้อมูลต่าง ๆ ที่ทำงานประจำวันได้อย่างสะดวกรวดเร็ว สนใจคลิกไปดูได้ที่นี่ครับ => Excel Tools
[code]
และปิดด้วย [/code]
ตัวอย่างเช่น [code]dim r as range[/code]
เพื่อให้แตกต่างจากข้อความทั่วไป สะดวกในการอ่านและทดสอบ (คลิกเพื่อดูตัวอย่าง)Code: Select all
Sub Test_record_wavie()
'
Dim st As Long
Dim dd As Long
Dim rr As String
Dim s As Long
Dim d As Long
Dim i As Integer
i = 2
st = Sheets("Waive case").Cells(1, 2).Value
dd = Sheets("Waive case").Cells(2, 2).Value
rr = Sheets("Waive case").Cells(3, 2).Value
s = Sheets("Raw data").Cells(i, 1).Value
d = Sheets("Raw data").Cells(i, 5).Value
Do
If st = s And dd = d Then
Sheets("Raw data").Cells(i, 6).Value = "1"
Sheets("Raw data").Cells(i, 7).Value = rr
Sheets("Raw data").Select
End If
i = i + 1
s = Sheets("Raw data").Cells(i, 1).Value
d = Sheets("Raw data").Cells(i, 5).Value
Loop Until s = 0
MsgBox "DONE"
End Sub