Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: search and do something

  1. #1
    Guest

    Default

    I have created a macro that searches through a column of data and when it finds the desired text it inserts a cell moving the text to the right. All the text I wish to search for are refered to one after the other within the macro but is it possible to list all the text somewhere on the spread sheet and get the macro to refer to the list I hope this reads well.

    Thanks

  2. #2
    Guest

    Default

    Hi,
    I am just wondering do you know how to create a macro to search more than one columns?

  3. #3
    Guest

    Default

    Hi There I wrote this one to search in col G but is guess you could change the line ("G:G")to read ("G:H")but Ive not tried it.

    Dim MyText

    On Error GoTo handleerror

    MyText = InputBox("Enter the 1st five characters of your Text")

    Sheets("statusreport").Select
    Do Until ActiveCell = " "

    Columns("G:G").Select
    Selection.Find(What:=MyBranch, After:=ActiveCell, MatchCase:=False).Activate
    ActiveCell.Select
    Selection.EntireRow.Cut
    Sheets("Sheet1").Select
    Range("B1").Select
    Selection.End(xlDown).Select
    ActiveCell.Select
    ActiveCell.Offset(1, -1).Select
    ActiveSheet.Paste
    Range("a1").Select
    Sheets("statusreport").Select
    Loop
    handleerror:
    Range("A1").Select

    End Sub

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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