+ Reply to Thread
Results 1 to 5 of 5

Search for value in range and clear value when found

  1. #1
    Registered User
    Join Date
    03-30-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    11

    Search for value in range and clear value when found

    TNO Bid_2.xlsm

    Hi,

    So I have a column as so

    1213
    12324
    5675
    56
    46
    56567
    etc
    etc

    And on another sheet I have a large array (30x30) of which I want to clear cell values that equal the cells in the above column. This is what I have tried so far;

    Please Login or Register  to view this content.
    Which for some reason deletes a whole host of values (but not the ones it should!). Not sure what I am doing wrong.

    I should point out that the cell values in both arrays are formatted as TEXT (despite being numbers - it was the only way round a certain procedure). I think this may be causing issues.

    Help is appreciated.
    Last edited by 3foo3; 03-30-2013 at 08:28 PM. Reason: attachment added.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,598

    Re: Search for value in range and clear value when found

    In order to step through your code:


    To Attach a Workbook:
    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    03-30-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Search for value in range and clear value when found

    Attachment added at top of OP. Macro is assigned to Exclude button on input sheet. it's a bit of mess - quite new to VBA. Any help would be great!
    Last edited by 3foo3; 03-30-2013 at 06:41 PM. Reason: typo

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,598

    Re: Search for value in range and clear value when found

    Since range ENGINE.Range("aj8:aj37") is empty I still could not check:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-30-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Search for value in range and clear value when found

    Wow - much obliged. Would never have figured that out! Thanks a lot!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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