Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Thread Tools Display Modes
Old 11-16-2023, 05:15 PM
Jetheat Jetheat is offline Copy Keyword to Another Column Mac OS X Copy Keyword to Another Column Office 2016 for Mac
Copy Keyword to Another Column
Join Date: Dec 2013
Posts: 21
Jetheat is on a distinguished road
Default Copy Keyword to Another Column

I have a list of long-tail keywords in Column A.

I want to copy any keyword to another column if it contains a specific keyword like "control".

How do I do that?

Also, how do I move it to another column instead of copying it over?

I'd like to learn both.

Appreciate the help,

Reply With Quote
Old 11-21-2023, 04:50 PM
Alansidman's Avatar
Alansidman Alansidman is offline Copy Keyword to Another Column Windows 11 Copy Keyword to Another Column Office 2021
עַם יִשְׂרָאֵל חַי
Join Date: Apr 2019
Location: Steamboat Springs
Posts: 78
Alansidman will become famous soon enoughAlansidman will become famous soon enough

VBA Solution
Option Explicit

Sub delcontrol()
    Application.ScreenUpdating = False
    Dim c As Range, rng As Range
    Dim lr As Long, lr2 As Long
    lr = Range("A" & Rows.Count).End(xlUp).Row
    Set rng = Range("A2:A" & lr)
    For Each c In rng
        If InStr(c, "control") > 0 Then
            lr2 = Range("C" & Rows.Count).End(xlUp).Row + 1
            c.Copy Range("C" & lr2)
        End If
    Next c
    Application.ScreenUpdating = True
    Application.CutCopyMode = False
    MsgBox "Action Completed"

End Sub
Alan עַם יִשְׂרָאֵל חַי
Reply With Quote

Thread Tools
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Required MS-WORD table copy paste solution from one column to another column USAMA Word 4 12-05-2021 05:31 PM
copy non zero values to new column Guloluseus Excel 3 01-10-2016 08:48 AM
If column B cell is a certain value then copy and paste the value to column A Snaybot Excel Programming 1 12-01-2015 07:10 PM
Copy column 1 data into Column 3 ShailShin Word VBA 1 06-18-2015 10:49 AM
Copy column entries on value Guloluseus Excel 3 01-05-2015 08:28 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:44 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd. is not affiliated with Microsoft