I'm attempting to simplify an excel sheet I work with on a weekly basis.
I'm trying to create a VBA Macro that would do the following:
Any help anyone can give me, I would greatly appreciate. I have searched for other macros and have attempted to modify them for my use to no avail.
**Example Before Macro**
A B C D E
1 Hi
2 Test
3
4 Done
5
6
**Example After Macro Has Been Run**
A B C D E
1 Hi
2 Test
3 Hi
4 Done Test
5
6 Done
Current Code:
Sub CopyC()
Dim SrchRng As Range, cel As Range
Set SrchRng = Range("C1:C10")
For Each cel In SrchRng
If InStr(1, cel.Value) > 0 Then
cel.Offset(2, 1).Value = "-"
End If
Next cel
End Sub
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.