Need to add Cells D7, F7, H7, J7, L7, N7, P7, R7 can't get it to work.
Private Sub Worksheet Calculate()
If Target.Cells.Count <> 1 Then Exit Sub
If Target.Address <> "$B$7" Then Exit Sub
If (Target.Value >= 0) And (Target.Value < 0) Then Exit Sub
Pictures("Picture 7").Visible =...
Hi, Im very new to VBA and have a code that enables me to select multiple options from drop down. How can I modify this to exclude a certain column, say column B?
Private Sub Worksheet_Change(ByVal Target As Range)
Dim xRng As Range
Dim xValue1 As String
Dim xValue2 As String
If...
Hi,
I am looking to hide/unhide rows based on a drop down validation.
The below codes works for one drop down however I have a further 2 drop downs that need to hide different rows.
any help will be greatly appreciated.
Private Sub Worksheet_Change(ByVal Target As Range)
'Updated by...
Evening,
I am using the working code supplied below.
So this code works like so.
If i enter in a cell in column D the number 3 once i leave that cell it changes to the word HUTTON STORES & also then in the next cell to the right of it the number 6, this is fine BUT if i forget to enter the...
This code works fine, but as I need to adjust my sheet rows and which ones should be visible and/or hidden, I would like to put a number in column A to represent the grouping.
Private Sub Worksheet_Change(ByVal Target As Range)
Me.Cells.EntireRow.Hidden = False
If Not Intersect(Target...
Hey i need some help with this code
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) On Error Resume Next
If Not Intersect(Target, Range("F10:R19")) Is Nothing Then
Target.Value = Target.Value + 1
Target.Value = Target.Value / 2...
Hi,
Looking for a solution to my Macro button (shape) problem.
I have the below code which will colour a depressed button.
Problem is this will only work for 1 button and i have 12 that i want it to work for.
The idea would be that the button stays depressed until another button is selected...
Hi,
Supplied is the current code in use.
I wish to expand the code to apply a number in the corresponding cell in column E
Target cells are currently in column D "name of shop" & now wish to also add in column E "mileage to that shop"
Currently if i enter 1 in the target cell i then see...
Hi,
On my worksheet called G EXPENSES i have the following code in use but when i leave the cell i dont see the name appear straight away but more like 2 seconds later.
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("D5:D35")) Is Nothing Then
If...
Hi all.
Got this VBA which is supposed to enable the adding and removing of more than one name from within the same cell. It's supposed to behave that if you click the first name it puts it in, if you then click a second different name, it puts that in too, if you come back next week and select...
I'm using a doubleclick event with the code below and all works well with the range of G2:G5.
At times the range could be longer, but not sure how to rearrange this to accomodate for say a range of G2:G10.
The range contains text.
If Target.Address = "$H$6" Then
If Target.Value...
Hi can anyone help please, I have the following code that clear the contents as well as the formulas on my spreadsheet. Can any tell me please how not to clear the formulas . Thanks
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
'Modified 6/18/2019 3:09 PM...
This code works in one TAB (sheet) but not in another. Any help appreciated!
Private Sub Worksheet_Change(ByVal Target As Range)
'Code by Sumit Bansal from https://trumpexcel.com
' To allow multiple selections in a Drop Down List in Excel (without repetition)
Dim Oldvalue As String
Dim Newvalue...
Hi all,
I found this code to alternate between two characters (I use it to go around the autofill checkbox problem) it works great except it changes all the cells in the column instead of just the selected cell.
P.S. I'm a real noob in coding, so please be specific :)
Private Sub...
Hello,
I'm new to VBA coding.
I found a very useful code that allows me to produce a checkmark when I double click on the task I've just completed. However, for some reason, I can't repeat the action. See code below:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As...
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...
Hey everyone,
So in my worksheet I have a lot of drop downs. Some are dependent on some are not. A few of the rows I have hide if "No" is selected in the drop down. After I use another drop down, the row un-hides itself. Does anyone have a solution to this issue?
Thanks in advance.
Here is a...
Hi there,
Can anyone help me amend this VBA code to include more than one reference (if possible)?
It currently refers only to D12 but I want to add another nine references - D68, D124, D180, D236, D292, D348, D404, D460 and D516.
Thank you!
Private Sub Worksheet_Change(ByVal Target As...
I want to delete picture based on cell value
If Target.Value = "Yes" Then delete RedArrow picture should only show GreenArrow picture not both
If Target.Value = "No" Then delete GreenArrow picture should only show RedArrow picture not both<strike></strike>
Private Sub Worksheet_Change(ByVal...
Hey everyone,
I'm trying to write a code that hides rows based on cell value, but with a twist. The cell that it is based off of is a drop down. I have it to where you can select multiple options within the cell. I have a list of colors in the drop down and at the end I have a "Special Color"...
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.