ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Cut cells from column A that contain "/" Paste them to column B (https://www.excelbanter.com/excel-programming/308217-cut-cells-column-contain-paste-them-column-b.html)

Yogi_Bear_79

Cut cells from column A that contain "/" Paste them to column B
 
Subject says it all. How do I search column A, find all cels that contain
the backslash character, then cut them from A and place them in Column B



Frank Kabel

Cut cells from column A that contain "/" Paste them to column B
 
Hi
try the following macro:
Sub cut_rows()
Dim lastrow As Long
Dim row_index As Long
Application.ScreenUpdating = False
lastrow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
For row_index = 1 to lastrow
with Cells(row_index, 1)
If instr(.Value, "\")0 then
.offset(0,1).value=.value
.clearcontents
End If
end with
Next
Application.ScreenUpdating = True
End Sub

--
Regards
Frank Kabel
Frankfurt, Germany

"Yogi_Bear_79" schrieb im Newsbeitrag
...
Subject says it all. How do I search column A, find all cels that

contain
the backslash character, then cut them from A and place them in

Column B




Yogi_Bear_79

Cut cells from column A that contain "/" Paste them to column B
 
Worked Perfectly..Many Thanks




All times are GMT +1. The time now is 07:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com