+ Reply to Thread
Results 1 to 5 of 5

VBA to Clear Contents When a Drop Down Selection <> "ValueA"

  1. #1
    Registered User
    Join Date
    08-16-2023
    Location
    Texas
    MS-Off Ver
    10
    Posts
    3

    Post VBA to Clear Contents When a Drop Down Selection <> "ValueA"

    Capture.PNG

    In the attached example, I have a working VBA to clear the A10:D10 Drop-Down menu when the value in A8 doesn't equal a certain value. That VBA is

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Intersect(Me.Range("A8"), Target) Is Nothing Then Exit Sub

    If Me.Range("A8") <> "We believe a check you deposited may not be paid for the following reason:" Then
    Me.Range("A10:D10").ClearContents
    End If
    End Sub


    Now, I basically need to perform the same function to clear A12:D12 (which is free-form text, not a drop-down) when A10 does not equal "Other:" I can't figure this out!!

  2. #2
    Registered User
    Join Date
    08-16-2023
    Location
    Texas
    MS-Off Ver
    10
    Posts
    3

    Re: VBA to Clear Contents When a Drop Down Selection <> "ValueA"

    Actual spreadsheet is now attached for review.
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,004

    Re: VBA to Clear Contents When a Drop Down Selection <> "ValueA"

    Try this,

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    08-16-2023
    Location
    Texas
    MS-Off Ver
    10
    Posts
    3

    Re: VBA to Clear Contents When a Drop Down Selection <> "ValueA"

    Attachment 840315

    Attached is a new issue that I can't tell is or is not caused by the Macro.

  5. #5
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,004

    Re: VBA to Clear Contents When a Drop Down Selection <> "ValueA"

    I can't see your attachment.

+ 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] Clear contents of specific range when using the "for each cell" function
    By luajambeiro in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-29-2019, 01:02 PM
  2. Prevent "delete row" but allow "clear contents"
    By alreadytaken in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-19-2019, 05:19 AM
  3. Add "N" number of rows and clear contents of some cells only
    By mickyh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-13-2019, 02:59 PM
  4. "clear contents" is converting my table into a range randomly
    By joepekimo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-25-2017, 06:29 AM
  5. IF "text" present with valueA >0, return valueB matching "text"
    By Raffen in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-26-2015, 10:06 AM
  6. Addition to Not clear contents based on if "NA" is in cell
    By bdouglas1011 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-17-2014, 01:35 PM
  7. [SOLVED] If cell H10 = "Not Stated" in sheet 1 clear contents D10:F20
    By intex in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-21-2014, 03:23 PM

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