Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
This macro looks for Ln and Ave and puts them in Col. C. My problem is that I have data in Col. C so I want the macro wherever there is a dada in Col. C it Does not move adjusent Col. B to Col. C. any help? Sub Move() Range(("A1"), Range("A65500").End(xlUp)).Select For Each x In Selection If x.Value = "Ln" Or x.Value = "Ave" Then x.copy Destination:=x.Offset(0, 1) x.Clear End If Next End Sub Thx. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...excel/200710/1 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If I understand you correctly, I think the two additional statements I have
added inline will do what you want... This macro looks for Ln and Ave and puts them in Col. C. My problem is that I have data in Col. C so I want the macro wherever there is a dada in Col. C it Does not move adjusent Col. B to Col. C. any help? Sub Move() Range(("A1"), Range("A65500").End(xlUp)).Select For Each x In Selection If x.Value = "Ln" Or x.Value = "Ave" Then If x.Offset(0, 1).Value = "" Then x.copy Destination:=x.Offset(0, 1) x.Clear End If End If Next End Sub Thx. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...excel/200710/1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hide/Unhide columns using button on top over relevant columns | Excel Discussion (Misc queries) | |||
to convert columns to rows having mulit independent group columns | Excel Worksheet Functions | |||
Combine multiple columns into two long columns, Repeating rows in first column | Excel Discussion (Misc queries) | |||
Combine multiple columns into two long columns, Repeating rows in first column | Excel Discussion (Misc queries) | |||
Pivot Table Creating New Columns that Subtract Two Existing Columns | Excel Discussion (Misc queries) |