This code for Sub FindReplace() worked in the attached document.
Is there anyway to use a different tab (Containing a Location and Room #), within the same workbook, to Use instead of the InputBox. So Instead of having to put a Room # in the input box, is there a way to specify a Location (In a particular Cell) and pull the Room # from the TableTab? Then use the Room # pulled (from the table) run the Find and Replace macro?Code:Sub FindReplace() FindNr = InputBox("Roomnumber to search", "Replace data") With Sheets("Sheet1") For Each cl In .Range("B1:B" & .Cells(Rows.Count, 2).End(xlUp).Row) If cl.Value = FindNr Then cl.Offset(, 1) = IIf(cl.Offset(, 1).Value = "x", "n/a", cl.Offset(, 1).Value) cl.Offset(, 2) = IIf(cl.Offset(, 2).Value = 0, "j/k", cl.Offset(, 2).Value) End If Next End With End Sub




Reply With Quote
Bookmarks