Hi everyone,
I have a sheet with two blocks of data. On both blocks, I want to hide a different number of rows, using the following code. The thing is that VBA says I can't have two of the same. Is there a way to have one (or more) macro(s) have multiple Worksheet_SelectionChange(ByVal Target...
Dear Gents,
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, Range("B2:B5")) Is Nothing Then
Cancel = True
ActCol = Activecell.Column
'other macro
According to above codes, If the user change the value of B2 to B5 and press "tab" on...
Hello Team,
I am planning to build one dashboard using work sheet change but not sure how to work with this option. My objective is to display list of fields based one cell value.
For example in A2 cell if you select "Fruit" then below automatically list of fruits should reflect and it should...
I have a simple log file with a couple of columns to log events. One row for each event.
Every cell in a row is manually entered and there are no macro's or formula's yet.
To prevent mistakes I now want to make a modification in column A... the date column.
As soon as one of the other cells in...
I've been trying to combine to separate change events in my VBA code. The first allows users to insert hyperlinks into specific columns and the second enables multi-select drop-downs in other cells.
The problem is I can't get them to work together. One always over rides the other. I've read...
Hi all,
I have this code here that simply turns the cells to uppercase.
[CODE][
Sub Turn_Uppercase()
For Each x In Range("C3:H200")
x.Value = UCase(x.value)
Next
End Sub
/CODE]
Does anyone know how would I adapt this code so that I can run in a sheet tab (Private sub...
Hello all
Im ok at writing some simple code in vba but when it comes to looping the code I always screw it up!
I have a code that is working and doing what I want it to do, except I have to re write this for 10000 cells! which is extremely time consuming, as you will see I have shown the exact...
I am trying to get a message box to fire automatically based on a cell value. Here is the setup:
I have a "configurator" tab (Sheet 2) that has an ActiveX drop down box with a list of names that corresponds to a table of names/job titles on a logic tab (Sheet 3). When you select your name on...
Good evening all,
I am looking into rolling out a sharepoint adoption at our company, using the co-authoring capabilities of Excel 2016 with OneDrive/Sharepoint to enable sharing of macro-enabled workbooks with userforms etc (at last we can do this!)
I am however hitting a snag with...
Hi all,
I have two worksheet changes that I am having trouble to combine so that the changes work at the same time. The two changes do affect the same cells, but one hides the whole row and one stops specific cells from being deleted.
Here are the two codes:
Private Sub Worksheet_Change(ByVal...
I have a range of column headers that is transposed from a list in column B. When a value from column B changes, I have a macro that will copy those values and transpose them into row 8, starting with R8. I want to prevent the user from changing the column headers.
I want the column and the...
Never been too good at passing variables, but can usually keep it simple enough to get by. Not this time however.
I have a macro that works okay and part of this calls another macro. The second macro passes 2 public variables and this seems to work okay. As part of the second macro however I...
Hello all,
I have produced a piece of code for the "worksheet_change" event but run into a problem.
What the code does:
Whenever one or more of the KeyCells is updated the code should run and update the color of its linked shape.
What is does now:
If only one KeyCell changes its value the...
Is it possible for two different subroutines to inhabit the same Worksheet Change Event?
There are two separate results that I would like to achieve, first is making a second worksheet visible based on which process is selected in cell "A1". Secondly, I would like to establish a tab order for...
Worksheet change event code required for linking between 2 sheets one is Raw Data other one is SH
I want that if there will be any value in AH column of Raw data sheet then B Column value of Raw data sheet will be linked to C column of SH sheet staring from Row 4 onward in SH sheet.
I have two sheets, "Raw Data" other one "SH"
I want a VBA code that if in the Raw Data sheet AH column there will be some value then the following of Raw Data sheet will be copied to SH sheet. Means the Row will be copied. For example if there will be some value in AH3 of Raw Data then...
Hey everyone,
I am working with some macro's in VBA and i am a little stuck. VBA is still new to me and im not entirely sure what im doing. I was given help with code for 2 different worksheet changes, but now i have 1 sheet, where i need to have both the codes working together (combined). This...
Hello guys and gals,
I'm a rookie to VBA and currently trying to combine two separate worksheet changes to my excel sheet. Both work individually, but i haven't found a way to combine them to run. I want them to change certain cells to N/A, dependent on the data in other cells. I know the codes...
I've got a workbook consisting of 3 tabs (book2) with some pretty elaborate logic to populate the tabs with data based on the import of another workbook (book1). Once the data is brought in, I want to setup Worksheet_Change logic on certain ranges in book2 to highlight changes to the default...
Hi,
I was really hoping someone could help me. I have only delved into the world of VBA the past month or so and whilst I seem to be grasping the concepts fairly well, or with the support of Google and these forums if I'm honest, I have come across a situation which has bme stumped. Let me set...
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.