Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Great, thanks for the feedback
-- Bernard V Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme remove caps from email "aileen" wrote in message ... Thanks so much. It worked perfectly with one minor adjustment. "Bernard Liengme" wrote: this seems to work Sub tryme() Application.ScreenUpdating = False mylast = Cells(Cells.Rows.Count, "B").End(xlUp).Row For j = 1 To mylast 'DEC, MAR, JUN, or SEP If Cells(j, "B") = "DEC" Or Cells(j, "B") = "MAR" Or _ Cells(j, "B") = "JUN" Or Cells(j, "B") = "SEP" Then Cells(j, "F") = Cells(j, "E") Cells(j, "E") = Cells(j, "D") Cells(j, "C") = Cells(j, "B") Cells(j, "B") = "" End If Next j Application.ScreenUpdating = True End Sub best wishes -- Bernard V Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme remove caps from email "aileen" wrote in message ... I need to search column B and if I find DEC, MAR, JUN, or SEP I need to cut the cells from that row in column B, C and D and paste them in C, D and E. e.g. Column B C D E PUT MAR 9 SP CALL DEC 8 IND DEC 8 SP 500 CALL JAN 9 IND MAR 9 SP 500 After running macro, should line up as below: Column B C D E PUT MAR 9 SP CALL DEC 8 IND DEC 8 SP CALL JAN 9 IND MAR 9 SP Any help is greatly appreciated. Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
change "true" and "false" to "availble" and "out of stock" | Excel Worksheet Functions | |||
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next | New Users to Excel | |||
What is Error "Method "Paste" of object "_Worksheet" failed? | Excel Programming | |||
Complex if test program possible? If "value" "value", paste "value" in another cell? | Excel Discussion (Misc queries) |