Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-26-2020, 11:56 AM
PrincessApril PrincessApril is offline Clear Cell directly to right when cell to left changes value Windows 10 Clear Cell directly to right when cell to left changes value Office 2019
Competent Performer
Clear Cell directly to right when cell to left changes value
 
Join Date: Nov 2019
Posts: 102
PrincessApril is on a distinguished road
Default Clear Cell directly to right when cell to left changes value

Hi all,



I'm trying to clear the cell to the right (column I, range 6-81) when the cell to the left (column H, range is 6-81) changes value.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("H$6")) Is Nothing Then
        Range("I$6").ClearContents
    End If
End Sub
I have it working for the pair of cells in H6/I6, but I'm unsure how to apply the same code to the whole range so that a change in any given cell in column H will clear the data from only the cell directly to the right of it in column I (but not the whole column).

I tried using a colon I$6:I$81 and H$6:H$81 but that cleared the whole column (and I only want to clear the cell directly to the right upon a changed value to the cell directly to the left; i.e., same row). I thought I was using the dollar sign correctly but perhaps not?
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Retaining the left side space in table cell kumarjeyabalan Word Tables 2 08-17-2019 03:14 AM
Clear Cell directly to right when cell to left changes value Clear all cell colors within a range starting at cell A8 and change row of active cell to yellow FUGMAN Excel Programming 7 02-05-2017 08:37 AM
Clear Cell directly to right when cell to left changes value If value of cell A Matches a value in a Range of cells (column) then add value of cell A to cell C rick10r Excel 1 07-05-2016 12:07 PM
Clear Cell directly to right when cell to left changes value Assign the value of a cell as a cell reference of another cell in Excel 2010 - How to? bharathkumarst Excel 7 10-13-2014 10:25 AM
How do I align image at ABSOLUTE top left of a table cell? shnoozin Outlook 0 07-22-2011 03:30 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:15 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft