Results 1 to 10 of 13

Thread: Highlight Data Based on Data in Another Column

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member
    Join Date
    Jan 2014
    Posts
    7
    Rep Power
    0
    This code for Sub FindReplace() worked in the attached document.

    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
    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?
    Attached Files Attached Files
    Last edited by Admin; 04-17-2014 at 07:52 AM.

Similar Threads

  1. Replies: 34
    Last Post: 03-13-2015, 02:26 PM
  2. Replies: 10
    Last Post: 02-18-2014, 01:34 PM
  3. Group And Transpose Data Based On Sections of Data
    By theladysaphir in forum Excel Help
    Replies: 5
    Last Post: 06-28-2013, 07:55 AM
  4. Replies: 17
    Last Post: 05-22-2013, 11:58 PM
  5. Group Pivot Data Based On Row Values In One Column
    By mrmmickle1 in forum Excel Help
    Replies: 10
    Last Post: 10-09-2012, 11:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •