Ok I attempted to use your code that is listed directly above and I am getting an error subscript out of range. Does the table have to be located on the SAME page as the items that are being changed or can it run from its own page. Currently I have it trying to run from a page that I have called "AUTO CHANGE". The page where the VBA routine should be looking and changing things is on a page called INITIATING DEVICES. I can not have it run on the same page due to the amount of data and rows. All the columns listed in the table above would already be filled up.
Listed above is what I have and the only thing I did was try to change worksheet(1) to worksheet(5) as this is where the "INITIATING DEVICES" page is found. I'm sure im doing something wrong here as it works really good on the file that I was sent. I'm also assuming that Value2 is a reference to Column 2 or (B) and that if I needed it to look other places I could change this for future ref.Code:Sub kTest() Dim MyTable, i As Long With Worksheets(5) 'worksheet number 5 is the "INITIATING DEVICES" page MyTable = .Range("G2:I" & .Cells(.Rows.Count, 7).End(xlUp).Row).Value2 With .UsedRange.Columns(2) For i = 1 To UBound(MyTable, 1) .Replace MyTable(i, 1), MyTable(i, 2), MyTable(i, 3) Next End With End With End Sub
Thanks again for all the help




Reply With Quote

Bookmarks