Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Give this macro a try...
Sub MandOpt() Dim R As Range Set R = Columns("B").Find("Yes", MatchCase:=False, LookAt:=xlWhole) R.EntireRow.Insert xlDown R.Offset(-1, -1).Value = "Mand" Set R = Columns("B").Find("No", After:=R, _ MatchCase:=False, LookAt:=xlWhole) R.EntireRow.Insert xlDown R.Offset(-1, -1).Value = "Opt" End Sub -- Rick (MVP - Excel) "Bobbo" wrote in message ... I need help creating a macro that will search colums B for "Yes" when it finds the first one I need a new row added above with the word "mand" incolumn A. Then search for the first "No" in column B and do the same except add the word Opt Need to go from this: tom yes john yes bob yes gill yes gail No peter No To this: Mand tom yes john yes bob yes gill yes Opt gail No peter No |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to Insert Current Date into cell - Macro to "Save As" | Excel Worksheet Functions | |||
Recorded single column insert in macro. Macro inserts two not one | Excel Programming | |||
make a macro to insert a macro | Excel Discussion (Misc queries) | |||
Insert macro | Excel Programming | |||
Macro to insert copy and insert formulas only to next blank row | Excel Programming |