Results 1 to 6 of 6

Possible use of VBA to clear cell content if a search term is found

Threaded View

s_bruno1 Possible use of VBA to clear... 05-17-2017, 06:32 AM
Olly Re: Possible use of VBA to... 05-17-2017, 07:17 AM
s_bruno1 Re: Possible use of VBA to... 05-17-2017, 08:01 AM
s_bruno1 Re: Possible use of VBA to... 05-17-2017, 08:20 AM
Olly Re: Possible use of VBA to... 05-17-2017, 08:31 AM
s_bruno1 Re: Possible use of VBA to... 05-17-2017, 08:33 AM
  1. #1
    Registered User
    Join Date
    10-26-2015
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    19

    Lightbulb Possible use of VBA to clear cell content if a search term is found

    Hi Everyone,

    I've been using this board for a while and learnt a lot thanks to many of your expertise and skill sets. I have searched these boards but have been unable to find a solution to my problem; hopefully something someone can help with?

    Key Points:
    1. I have a spreadsheet which consists of a number of tabs (7 in total)
    2. I am copying data from reports (from a .txt file) into column A of each tab (i.e. reportOne.txt will be copied into tab 1 column A, reportTwo.txt will be copied into tab 2 column A).
    3. I then have other reports that are generated at a later date and these will be used to populate column B in each tab (i.e. reportOne_v2.txt will be copied into tab 1, column B etc.)
    4. I am then comparing the two columns on a row-to-row basis (as the structure and contents should be exactly the same). Code that I am using (which works fine) is:
      =IF(ISERROR(VLOOKUP(A1,B1,1,FALSE)),"No Match","Match")
    5. This formula is placed in Column C of each tab and copied/dragged to the last row containing data


    My Problem:
    1. The reports contains rows of data that I do not want to compare (i.e. I do not want to code above to be present in row C).
    2. What I have been doing is looking for search terms using a filter, selecting these rows and then manually removing the formula in Row C.
    3. Some reports run into thousands of rows, although many of the search terms have similarities and so the filter works fine, although this method is slow and inefficient and I have a 20 min time-frame to complete the whole task.


    Ideal solution:
    1. Would it be possible to have pre-defined search terms on a tab-by-tab basis that clears the content in column C if the search terms are matched?
    2. Possibly something we can do using VBA?
    3. Ideally I would like a button or to run a Macro that clears the content of column C if a row in column A finds a row that contains for example ("machine date/time...")

    By doing the above it will drastically reduce my manual work and ensure I complete this task within the set time-frame.

    Thanks and kind regards,

    Sam
    Attached Files Attached Files
    Last edited by s_bruno1; 05-17-2017 at 06:35 AM. Reason: Added attachment and grammar

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Clear content referencing another cell's same content
    By papusale in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-08-2015, 05:21 AM
  2. [SOLVED] Search content from cell A1 in Sheet2 and select the content found
    By excelcandy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-04-2013, 06:45 PM
  3. [SOLVED] Formula to display cell if the text content partially matches a search term
    By Avestron in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-11-2013, 04:07 AM
  4. IF same CONTENT FOUND IN CELL A THEN DELETE CONTENT IN B,C or D
    By mecutemecute in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-11-2013, 01:16 AM
  5. [SOLVED] Search for value in range and clear value when found
    By 3foo3 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-30-2013, 08:27 PM
  6. Replies: 4
    Last Post: 05-12-2011, 02:25 PM
  7. Replies: 3
    Last Post: 07-12-2006, 10:15 AM

Tags for this Thread

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