![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
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 |
|
Guest
Posts: n/a
|
Hi,
I am just wondering do you know how to create a macro to search more than one columns? |
|
|
|
#3 |
|
Guest
Posts: n/a
|
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 |
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|