Hello!
I have this code which works, but I would like to restrict it to just one column - is this possible? It would be massively helpful to prevent users from doing them same in additional columns. Thanks!
Option Explicit
Private Sub Worksheet_Change(ByVal Destination As Range)
Dim...
Is there a way to automate the sorting of a row a-z ascending but across not down. I add a new column in once a week and use a script to make it quicker however i was hoping i could always ensure the row is organised ascendingly without having to do anything?
For example
Row 1 Week1 Week2...
Hi there,
I am trying to create a VBA project that will run on opening a password protected workbook. I want it to populate the username in E1, then to use that username to force filtering Column C, based on a lookup in cell F2 (looking up their actual name based on E1). This is the code I am...
Hi there,
Is there an excel formula or VBA code that can highlight the 2nd occurrence of a specific character in cell? For example, the letter "B" appears twice in the cell, how can I highlight the second "B" in blue?
BATBML
Thanks,
Ching
i have recently set up the code below:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub 'Does nothing if several cells are changed
If Not Intersect(Target, Range("A:A")) Is Nothing Then 'Only if cell changed in column A:
Target.Offset(, 1).Value =...
I'd be really grateful if some one could help me with this, I've been trying to work it out for a while but I'm not getting anywhere. I have a VBA to send an email based on individual rows and the data they contain.
I'd like a way of sending individual emails to all recipients and the data on...
(Note: I have already posted this question in other groups but have not received any response)
My goal is to close a file without being prompted to save after changing a shape, specifically the size of a button; to this end, after changing the button, I set Thisworkbook.saved to True but if I...
One way to display text in the values area of a pivot table is to use conditional formatting with a custom number format. Unfortunately, Excel scripts currently cannot apply this kind of feature to pivot tables, only to ordinary cells.
On the other hand, good old VBA can do it. So, this is a...
Greetings,
I have an excel document that tracks items on a "to-do list", I have an active and historical tab. Active for anything that is still outstanding and the historical for anything that has been completed. I am running a code that will automatically transfer my active tasks to my...
Hello,
I am new to VBA. I have the following code that works great except that I need it to paste the range as a link to the original range. Help!!!
Sub CopyColumns()
Dim Source As Worksheet
Dim Destination As Worksheet
Dim Last As Long
Application.ScreenUpdating = False
'Checking whether...
Hello All,
I am trying to make a more generic way to create a XY scatter chart and add data to the chart. Here is some test code.
Sub Test_Add_Series()
Dim DataTab As String
Dim PLTab As String
Dim Xrange As Range
Dim Yrange As Range
Dim Trange As Range
Dim Snu As Long
DataTab =...
I have an Access DB that can (in Windows10) get data from a GPS receiver assigned to a com port.
The organization has decided to upgrade our computers to Windows 11, now Access/VBA no longer understands the data coming from the GPS receiver.
I am adding an image showing the "data" Access sees...
I have an Excel Sheet that holds a Table (Table named "PST_2" ) that I need to append to an Access Database (DB named "STATS.accdb"). I need to do this while the user has Excel open, and without opening the Access application, as some users may not have it. I know how to initiate appending...
I have a worksheet with a long Vba code to run many rules in the sheet - One of these rules is to insert today() date in cell "D11" when any edit happen in cells ("E5 or G5")- the problem is that I face a lot of delay in this rule to apply after many times try and sometimes it run after...
I'm having difficulty finding a way to merge cells based on their values. Here’s what I need:
I have two dependent dropdown menus in columns D and E. When the value "DD9900" is selected in cell E12, I would like a script that merges E12 with E13 and also merges D12 with D13.
To clarify, when...
Hi, I'm trying to hide rows on an excel worksheet ("SOW & RHS") based on whether or not a specific cell of another worksheet ("Labor & Material") is empty. i.e.: If cell C5 of worksheet ("Labor & Material") has any value (if it is not empty) , row 24 on worksheet ("SOW & RHS") should be visible...
Hi all,
Hopefully an easy question for you :).
I am very new to VBA and I am currently fiddling in an already made document to try and understand what is happening.
It is an Excel sheet where we want to copy data from various sheets into a single sheet.
It starts with searching the input...
Hi - I have an excel sheet which has numerical data in columns J through AV. I would like to highlight rows where all columns have data as either 0 or blank. How do I achieve it through either conditional formatting or formula? Example below - (In this, I would like to highlight row 2). Thanks...
So I have a budget spreadsheet that is a list of values in different sections, a total at the bottom that sums each value in the section, and a overall total that sums all the section totals.
If possible I want to create a macro that allows me to press a button and insert a new row into a...
Hello,
I am trying to build an XLOOKUP into my code that will lookup the first value underneath the header "STATE CD 1", as my columns can vary depending on the workbook. I am not sure if I should use the lookup in this code, or if I should make it separately so I am open to feedback on this...
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.