Hello,
What I'm trying to do is compare three coloums in three diffrent worksheets and print the data to a forth worksheet. Worksheet 1 is a main database of products worksheet 2 is a list of out of stock items, and sheet 3 is discontinues items. I barrowed a small piece of code from an example I did find and modified it, but not sure were to go from there. This is the code I have thus far. The worksheets will vary in the number of items so I've set each range to the maxium possible, at least as I understand things. If anyone can point me in the right direction, I would be greatful.
Sub Test()
Dim Rng1 As Range
Dim Rng2 As Range
Dim Rng3 As Range
Dim c As Range
Dim x As Long
With Worksheets("maindb")
Set Rng1 = .Range("F2:F" & .Range("F65536").End(xlUp).Row)
End With
With Worksheets("Out of Stock")
Set Rng2 = .Range("A1:A" & .Range("A65536").End(xlUp).Row)
End With
With Worksheets("Discontinued")
Set Rng3 = .Range("A1:A" & .Range("A65536").End(x1Up).Row)
End Sub
What I'm trying to do is compare three coloums in three diffrent worksheets and print the data to a forth worksheet. Worksheet 1 is a main database of products worksheet 2 is a list of out of stock items, and sheet 3 is discontinues items. I barrowed a small piece of code from an example I did find and modified it, but not sure were to go from there. This is the code I have thus far. The worksheets will vary in the number of items so I've set each range to the maxium possible, at least as I understand things. If anyone can point me in the right direction, I would be greatful.
Sub Test()
Dim Rng1 As Range
Dim Rng2 As Range
Dim Rng3 As Range
Dim c As Range
Dim x As Long
With Worksheets("maindb")
Set Rng1 = .Range("F2:F" & .Range("F65536").End(xlUp).Row)
End With
With Worksheets("Out of Stock")
Set Rng2 = .Range("A1:A" & .Range("A65536").End(xlUp).Row)
End With
With Worksheets("Discontinued")
Set Rng3 = .Range("A1:A" & .Range("A65536").End(x1Up).Row)
End Sub