worksheet_change

  1. 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 =...
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. J

    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...
  9. 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?
  10. 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...
  11. 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...
  12. M

    Recording Time of Changes in another Worksheet

    MAJOR AMATURE ALERT! I'm trying to code a module to record the time of changes made to a workbook (several worksheets) to another worksheet. I can get the code to record the time of the change for a range with multiple columns to the next cell over (xOffsetColumn = 1). I am trying to send that...
  13. L

    Help to combine two Private Sub Worksheet_Changes

    Hi, I am using VBA to automate values in a specific column for a tracking sheet. It works great but as always is the case I am wanting more. Can anybody help me reorganise these 2 pieces of code so that they work simultaneously in the same worksheet change? Here is the code: Private Sub...
  14. L

    Selective elimination of code execution.

    In the code below, recording TO respective sheets works well... recording FROM respective sheets changes the value in B3 thus execute the recording TO respective sheets again... the former is essential, how to stop the latter ? Private Sub Worksheet_Change(ByVal Target As Range) Dim myWS As...
  15. M

    Combining 2 Worksheet_change codes

    hello guys, I have a Worksheet_change code that is working perfectly well (see below). I would like to add another code, using the same functionality i.e. (Worksheet_change) so that all entries in column HA are automatically Uppercase. How can I add a second code, right after the one below so...
  16. N

    Only update changed cells in variable range triggered by Worksheet_Change

    Hello, I have a sheet that user can update. Columns A, C-G and I-J are text Columns B and H are date format. I force the format to consolas (to see difference between O and 0), set the date cells to yyyy-mm-dd, do some centering and indenting. BUT: I do this inefficiently on all cells from row...
  17. S

    Change a worksheet_change to a workbook_change code

    I have a timestamp I've previously talked to people about. It's a worksheet_change item and I either need to make it into a macro that runs automatically (so when I input data into "R5" it puts a permanent, non-changing/updating timestamp "dd-mmm-yy" in "F4" The fun part about this- it needs...
  18. Z

    Worksheet_change only when user input value

    Hi, Is there any way to use worksheet_change event only when user input some value? I do not want to execute event when value will be added by macro. I know that can use Application.EnebleEvents but I really do not like it couse of possibility of demage all macros when some error occurring...
  19. J

    Worksheet_Change Issues

    Okay, so correct me if I'm wrong, but the purpose of the Worksheet_Change function is to run your code and update each time something is changed in the actual Excel sheet, right? I am having trouble using the Worksheet_Change method in my VBA program. Photos here of my code and then of my...
  20. S

    Worksheet_Change event

    Hello, I am looking to modify the below code in a way that when the user selects "Yes" in the drop down in cell A1, macro should just Exit sub. And when user selects "No" in the drop down the code should trigger "MyMacro". Private Sub Worksheet_Change (ByVal Target As Range) If Intersect...

Some videos you may like

This Week's Hot Topics

Top