worksheet change event

  1. M

    Send Userform Data to Multiple Worksheets

    I am in the process of creating a MultiPage userform that has 4 pages: Page 1 = Project Information Page 2 = Daily Meter Readings Page 3 = Job Mix Formula Page 4 = Natural Gas Usage I have created a command button in the main userform called "Submit". When I click the "Submit" command button...
  2. Fishboy

    VBA - Worksheet change event to highlight duplicates

    Hi all, I am working on an Excel 2010 workbook and have implemented the following tweaked code I found online. In essence it is a worksheet change event which highlights cells red when duplicate values are added to column A (which is a list of candidate names). Option Explicit Private Sub...
  3. K

    Detect Sheet2 change event in Sheet1 Module through VBA

    I have two worksheets Sheet1 and Sheet2. I need to write function in Sheet1 module which would detect Sheet2 change event. I need this function in Sheet1 module cause Sheet1 would get duplicated with new revisions and want this code to get duplicated as well with it.
  4. B

    Using Worksheet_Change for two Different Target.Address (Excel 2007)

    Greetings. I have two cells that are both drop down lists referenced from a Vlookup Table. When One cell is "D11" for the "Group" and the other is "D12" for the "Campaign". When the user selects from the drop down cell what they want, I have 3 pivot tables that should change their filter based...
  5. C

    Loop through worksheet names

    Hi all, I'm trying to write some code that loops through the names of the worksheets within a workbook and if the workbook title has the word 'Summary' in it, I want to do something further with the data in that worksheet. Will the following lines of code do that? For Each ws In...
  6. H

    VBA Excel - Hide rows based upon multiple cell values

    Hi there, First time poster, and beginner with VBA. I'm trying to write a code to hide/unhide rows based upon multiple criteria. I've managed to fumble my way through worksheet change events but can only get them to fire based on the last cell changed. Ultimately this is what I want to do, but...
  7. P

    Combining Multiple Worksheet Change Events

    Hi, I am new to VBA and am having some trouble combining two worksheet change events. As I understand you can only have one event per worksheet. One macro hides rows 8:9 if cell E14="" and unhides if otherwise. The other macro would hide rows 20:21 if cel E15="" and unhide if otherwise. How...
  8. L

    Worksheet Change Event code - protect cell depending on outcome of adjacent cell

    Hi, Was wondering if someone could help me with some code. I want to lock cells depending on the value of other cell. i.e. If the Vlookup formula in cell J1 returns "Yes", I want cell K1 to be locked for editing and if cell K1 returns "No" I want cell K1 to be able to be edited. Really...
  9. M

    Excel crashes when macro is run from VBA interface, but works when using a button.

    I have a macro that takes different ranges, performs calculations with values in them, and then copies the value to a cell to be available for use to formulas in the worksheet. I want this macro to run when values in certain ranges are modified. I use this same code in different worksheets...
  10. I

    Trying to have one cell trigger a formula calculation in one other cell

    I am tring to develop a yield managment type of spread sheet where the pricing peramiters are variables. I have a data entry event in one cell casue it to calculate a formula in another cell. I need to do this for a range of cell but I want each cell in the range to correlate to one and only one...
  11. M

    Excel 2010 - ActiveX ComboBox Placed On All Worksheets With Dropdown Listing All Worksheets From Formula Generated List

    Hi! I haven't been able to find an answer on this and my issue could be piecing together code I found on multiple forums. This worked fine with the first combo box I tried but I am unable to get this to work on subsequent worksheets. My goal is to have an ActiveX ComboBox drop down...
  12. N

    Dynamic Chart Value

    I have a script in a module which defines the data in the chart as well as the X and Y axis. In the module: Sheets(she).Cells(14, 20) = Int(tn - 10) In the sheet I have the following script: Private Sub Worksheet_Change(ByVal Target As Range) Select Case Target.Address Case "$T$12"...
  13. S

    Simplify code

    So my problem is that I have 900 lines of code in a Worksheet Change event sub. On my rig, it runs pretty quickly, but on the PC the sheet will be used on, it takes about 2 seconds to run, so from a productivity standpoint, it's not ideal. What the sub does is it colorcodes the rows based on...
  14. M

    Worksheet Change Event and Selection change not working

    Hi I have a suggestions log, and I would like to keep a track of Likes and Dislikes. I have an Excel table with a specific column to vote, but entering "L" or "D" (for Like and Dislike). I have code which will tally this up and identify net Like or Dislike. However, to call this macro, I'm...
  15. E

    Worksheet Change Events based on different values? Excel 2010

    Hi Everyone, Hope you can help with this one. Is it possible to have a Worksheet Change event based on different values in the Target? The Code I have is: Private Sub Worksheet_Change(ByVal Target As Range) Application.ScreenUpdating = False ActiveSheet.Unprotect If Target.Cells.Value <>...
  16. J

    VBA to double-click through a range

    I am trying to get my code to double-click through a range in column B. The range is determined based on the where there is a blank cell in column A - see code below. The issue I'm having is that the double-click works for the first cell within the range but it then jumps to the first cell...
  17. B

    Enable Events Issue

    The procedure below is called within all of my other procedures, including event procedures (worksheet change and worksheet selection change). Stepping through the code, the procedure the following line evaluates to true (Trim(Range("Rationale").Item(1).Text) <> "" And...
  18. A

    How to change the color of cells with a cell value change in worksheet_change

    Hi I am working on a code in which i have to change the color of certain cells if the value of a cell is Y/N. The color should change with the user input. Set wsheet = wbook.Worksheets("XYZ") For Row_start=10 to Row_count 'Row count is the last used row in the worksheet RowValue =...
  19. A

    How to change the color of cells with a cell value change in worsheet_change

    Hi I am working on a code in which i have to change the color of certain cells if the value of a cell is Y/N. The color should change with the user input. Set wsheet = wbook.Worksheets("XYZ") For Row_start=10 to Row_count 'Row count is the last used row in the worksheet RowValue =...
  20. G

    Trigger VBA on cell change error

    Hi all, I'm using the macro below to detect cell changes in a column. If a change is detected, the address of the change is used to build an array of related rows to which I want to apply another macro. This is working beautifully when I either enter a value in a cell or clear the contents of a...

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 MrExcel.com.
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 "mrexcel.com".
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
Back
Top