Search matched fields from changed row to other worksheets of the right hand side

logstarter

New Member
Joined
Apr 14, 2017
Messages
39
Hi,

I have a excel log book for booking resources with multiple worksheets for each month of the year. Each worksheet has the same templates (same headers).

Like Column A-D is for Book A, E-H is for Book B...etc
and Column A, E will record the user name,
Column B, F will record the contact no...etc.

What I would like to do is to check if there are any duplicate user name and contact no in/after the input row. I think I need to have two for loop to loop through the worksheets and the rows. But I have no idea how to do the searching to match both name and contact no. Would anyone could give some advices, please?

Code:
Function checkduplicate (byval target as range) as Boolean
    For i = ActiveSheet.Index To ActiveWorkbook.Worksheets.count
        For j = ChangedCell.Row To 200   'assume max row of the worksheet is 500
            
        Next j
        
    Next i
' if no duplicate
   checkduplicate = false
end function

Thank you.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Forum statistics

Threads
1,213,546
Messages
6,114,256
Members
448,558
Latest member
aivin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top