+ Reply to Thread
Results 1 to 7 of 7

VBA Formula to "Move" Cells Containing Specific Text

  1. #1
    Registered User
    Join Date
    06-11-2013
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    42

    VBA Formula to "Move" Cells Containing Specific Text

    Hello,

    I'm hoping to get a little help in writing a VBA formula to move some data in my spreadsheet to a specific column. To be exact, I have a spreadsheet in which my columns AA - AT contain URL links to some websources I've used in research. I'm trying to get any of the cells with SEC sources, or that contain the text "sec.gov", to move to my "Official Sources" column (AW).


    Does anyone know if this is possible? Greatly appreciate the help!

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: VBA Formula to "Move" Cells Containing Specific Text

    Question: if multiple matches are found, which value should be written to AW? The first match? All matches concatenated (with a delimiter) ? If no matches found, leave AW blank?
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA Formula to "Move" Cells Containing Specific Text

    If there aren't any circumstances where there may be more than one match then this may help.

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    06-11-2013
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    42

    Re: VBA Formula to "Move" Cells Containing Specific Text

    Good point, I hadn't thought about that. If there are multiple matches, than I would say the cell that contains "sec.gov" and is furtherst to the right. And then if no matches, leave the cell blank

  5. #5
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: VBA Formula to "Move" Cells Containing Specific Text

    Okay, then try:
    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA Formula to "Move" Cells Containing Specific Text

    Another:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-11-2013
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    42

    Re: VBA Formula to "Move" Cells Containing Specific Text

    That works! Sorry for the delay, took me some time to figure out how to integrate that into my last formula. Is working perfectly! Thanks so much for the help with this, it's going to save a lot of time!

  8. #8
    Registered User
    Join Date
    06-11-2013
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    42

    Re: VBA Formula to "Move" Cells Containing Specific Text

    Just posted a new thread in case either of you are available for a little help.....

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] If(Search to say "YES" or "NO" if cell contains specific text
    By Alt= in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-24-2014, 03:23 PM
  2. [SOLVED] "button" to move curser to a specific cell based upon formula results in another cell
    By Araise in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-16-2014, 03:21 PM
  3. Replies: 11
    Last Post: 11-21-2013, 01:16 PM
  4. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  5. [SOLVED] If there is any text in column "A$" on "sheet1" then move cell to column "A$" on "sheet2"
    By ckgeary in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-27-2013, 08:28 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1