1. M

    VBA for Calling Cell in Row Range and Writing to Same Row but Different Column for Multiple Rows

    Not sure if the title is fully clear on what im asking for as i am new to using VBA in excel but essentially I am looking to add in a date field to a cell in the same row but in a different column that is consistent. I feel like there is some way of seeing the selected cell in the range and...
  2. C

    How to target Worksheet_change() on only a specific named column of a table in the sheet

    Hi Hope to have some advice on this problem. In worksheet "Work" I have a table named "tbl_work" which contains named columns "colA", "colB", "colC".... I want something to happen only when changes occur in "colB". Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents =...
  3. Jaafar Tribak

    Worksheet_Change(ByVal Target As Range): How was the Target Range changed ?

    Hi all, Worksheet_Change(ByVal Target As Range) The worksheet change event tells us which Range (Target) was edited but doesn't tell us how. As we know, the user can change a cell either, by editing it with the keyboard, by pasting a value into it ,by drag and drop or by using the autofill...
  4. D

    Worksheet_Change when user Drags File Handle or Copy/Paste Multiple

    I have the following Worksheet_Change code that works perfectly when a single cell in the target range is changed (B11:B & LastUsedRow). However, the code fails when a user copy/pastes multiple values or drags the file handle to pull a string down the cells. I've hit a mental roadblock on...
  5. L

    VBA Worksheet_Change Not Firing

    Hi all, I'm a VBA beginner and have been following this youtube video () by Excel for Freelancers to make a template similar to my needs. At about the 48 minute mark, this private sub was made to prevent a user from editing more than one cell at once: Private Sub Worksheet_Change(ByVal...
  6. O

    Multiple Private Sub Worksheet_Change

    Hello, I need help with combining these two codes into the Worksheet_Change sub, I can get them to work on their own but can't combine them properly. In the first sub I am ensuring users enter a date in the date field when entering data in other columns in the row: If Target.Cells.Count > 1...
  7. J

    Excel 365 - Private Sub Worksheet_Change (ByVal Target As Range) not working/triggering

    Hi, I have an old excel file (XLSB) that I wrote to help others understand how VLookups actually work, as I kept getting the same questions about 'Why is it not working this time when I have done everything the same', this will have been created in about 2013/2014. Within the file I have a...
  8. D

    Worksheet Change

    Morning all I was very kindly provided the code below which produces a message should the value of one cell (row 39) exceed the value of another (row 41) as users change data in a column. That works great. What I would like to do is change it ever so slightly in that I would like the message...
  9. R

    Run Macro whenever this cell changes

    When I run Macro1, in my worksheet, it performs a goal-seek process then stops. I want to repeat this macro one time whenever a change is made to Cell C14. I think this is a worksheet_change event. I have tried repeatedly, but unfortunately, my knowledge and skill-set are inadequate to write...
  10. N

    VBA: Subtract date after cell change

    This is my initial code out of confusion with how Worksheet_Change works Private Sub Worksheet_Change(ByVal Target As Range) With ThisWorkbook.Sheets("Home") If Target.Address = "$B$4" And Not IsEmpty(.Range("B4", "B1", "B2").Value) Then .Range("C1").Value =...
  11. C

    Applying Worksheet_Change to lots of sheets

    Hello all, I have a workbook in which there are a large number of sheets - most of which are "Person Sheets" - duplicates of the same sheet, containing data about various people. You can differentiate the "person sheets" from the other sheets as they have an x in cell B1. Anyway, I need to...
  12. Johnny Thunder

    VBA Help - Combine 2 Worksheet_Change Events - Excel 2016

    Hi group, So I have two Worksheet_Change Events written out but I realized today that you can only have one per page so here is the code, can anyone suggest a revision to combine the two into one so that I can wrap up this project...
  13. Z

    Pass Worksheet_Change Target Value to Userform

    Hello All, Here is my situation. I have a Worksheet_Change Event that tracts when Range AC has data entered. I have a YesNo message box that pops up asking the user if they want a special document to be drafted. If they select yes, then a userform will pop up with three option select and a...
  14. W

    change trigger from Worksheet_Change to Woorksheet_Calaculate

    I'm trying to change the trigger from Worksheet_Change to worksheet_calculate cannot get it to work. Private Sub Worksheet_Change(ByVal target As Range) If target.Cells.Count <> 1 Then Exit Sub If target.Address <> "F13" Then Exit Sub If (target.Value >= 0) And (target.Value < 0) ThenExit...
  15. M

    MERGE TWO Worksheet_Change codes

    Hi, I am trying to merge two VBA codes; Code1: Private Sub Worksheet_Change(ByVal Target As Range) ' If Target cell is B6 then... If Target.Column = 6 Then ' Clear contents of E6 Target.Offset(0, 1).ClearContents ' Clear contents of H6 Target.Offset(0...
  16. M

    Worksheet_Change private sub Run-time Error when deleting cell values

    The code below is acting as expected... If user enters "Personal" in any cell in Column J, cells on the same row in Columns K & L auto-fill with "Personal" If user enters either "Misc." or "Other Meals" in Column K, cells on the same row in column L auto-fill with the same word HOWEVER, any...
  17. JackDanIce

    Worksheet_Change to prevent area change

    Hi, I have a dynamic area under B14:H14, which I only want to add rows to via macro input and not limit via cell protection. Is there a way to use Worksheet_Change to detect if a user enters a value in a defined area and prevent cell value edit? Tried to search for answer, but must typing...
  18. T

    VBA Worksheet_Chnage event bug

    My program has both a Worksheet_Change event and a Worksheet_SelectionChange event. For some reason, when it runs to the end of the Worksheet_Change event, it jumps to the Worksheet_SelectionChange event. Has anyone experienced this before?
  19. E

    Worksheet_Change - including multiple named cells

    Hi, I want to run a filter when one of twenty named cells are changed. Problem is I can only add two cells to the 'set cells', I need to add twenty. Also the filter runs on 800 cells, is there anyway to speed it up a little? Thanks in advance. ( I'm not an expert at VBA :) ) Private...
  20. M

    How to have worksheet_change(byval target by range) to run with workbook_open

    I want to be able to have a workbook do a function when opened. So I want to have a targeted column in a sheet, if a date is 90 days prior to the current date, it will automatically delete the section associated with that date. Example - if today is 4/23/19 and a previous input in a sheet is...
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back