+ Reply to Thread
Results 1 to 3 of 3

Delete Values from A3, M3 cell when any columns clicked except D & J

  1. #1
    Registered User
    Join Date
    06-10-2023
    Location
    Mumbai India
    MS-Off Ver
    2019
    Posts
    21

    Delete Values from A3, M3 cell when any columns clicked except D & J

    I want to delete values from Cell A3 & M3 when clicked on any column except Column "D" & Column "J", below code doesnt do anything except giving error.

    r = Range("D")
    c = Range("J")
    Range("A3,M3").ClearContents

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: Delete Values from A3, M3 cell when any columns clicked except D & J

    kind of strange, but here is the selection change event for that, any other column but columns D & J will clear the two cells.
    Goes in the worksheet module


    Please Login or Register  to view this content.

  3. #3
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,743

    Re: Delete Values from A3, M3 cell when any columns clicked except D & J

    You do not show whole code but this part...
    Please Login or Register  to view this content.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

+ 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] Use Vlookup as macro on clicked cell and all cell values below that clicked cell
    By harman83 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-06-2015, 12:58 PM
  2. Hide Columns in sheet based on value in double clicked cell
    By lassil98 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-10-2014, 01:18 AM
  3. [SOLVED] Load web image when cell holding URL is clicked/double-clicked
    By jchamber00 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-20-2013, 09:13 PM
  4. [SOLVED] code so that when a cell is clicked, a tick mark goes in the cell that was clicked
    By behnam in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-08-2013, 01:17 PM
  5. Showing data in columns dependent on which cell is clicked
    By sayli in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-08-2013, 01:26 AM
  6. Replies: 3
    Last Post: 11-06-2012, 11:26 AM
  7. Change cell value when right-clicked/double-clicked
    By grime in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-17-2005, 09:05 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