detect number repetition
* from the last draw to the next,
* the base or reference is always the last number
* goal see the repetition
https://www.excelforum.com/attachmen...1&d=1567770769
detect number repetition
* from the last draw to the next,
* the base or reference is always the last number
* goal see the repetition
https://www.excelforum.com/attachmen...1&d=1567770769
![]()
Option Explicit Sub test() Dim buf1, buf2, buf3 Dim r As Long For r = 6 To Cells(Rows.Count, 1).End(xlUp).Row buf1 = Cells(r, 1).Resize(1, 5) buf2 = Cells(r + 1, 1).Resize(1, 5) buf3 = GetReptArray(buf1, buf2) Cells(r + 1, 7).Resize(1, 5) = buf3 Next End Sub Function GetReptArray(temp1, temp2) Dim temp(1 To 1, 1 To 5) Dim i As Integer For i = 1 To 5 If temp1(1, i) = temp2(1, i) Then temp(1, i) = "x" Else temp(1, i) = "" End If Next GetReptArray = temp End Function
hello yujin, perfect, great job works well, for good, thanks
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks