vba

  1. A

    Open, Copy data and Close a workbook based on the names of the tabs in my active workbook

    Hello everyone, Apologies English is not my first language and I am very new to writing VBA codes. So far, I have only copied and adapted parts of the codes to fit my needs. Recently, I have created a workbook, each tab has the name of a treatment site. Daily, I receive data about these...
  2. M

    Direct Referencing Non Contiguous Columns

    Hi all, long time lurker first time poster. I am somewhat of a VBA newbie and am trying to write a script to assign values from one of my workbooks to a template workbook, however the data in the source file is non contiguous. The below script does not cause an error. however the data from the...
  3. C

    Copy, paste, change name of file.

    I am working on a quote tracking program in excel and would like to streamline the quoting process. I have an office form my sales staff can fill in which populates an excel table for me to see the information. Within the table I have formulas to do many things and one is to compile a lot of the...
  4. B

    VBA for copying data from multiple ranges until blank into a list

    Hello, I am trying to copy values from Columns R, W, X and Z from the Template (red pic) into columns A, B, C, D. I need a VBA to go through these columns until there is a blank row and then paste it into A,B,C as so it creates a nice list going down. I will need this code to continue multiple...
  5. J

    Pulling Data From ~300 Individual Sheets Onto a Master Sheet

    Any all all help is appreciated! I’m operating out of a company SharePoint, as multiple people need to be able to access these sheets. I want to have a Master sheet, that tracks information from ~300 individual site portfolios. I want the Master sheet to be able to automatically pull about 30+...
  6. W

    VBA - Match two values from Table1 to two in Table2 and move/align

    Hi there, first time post here so i apologize in advance. I have looked everywhere for VBA code to help me with this task but can't seem to find what i need. I have a large table of engineers stock count which i add to once a month when we run our stock reports, the table grows by two columns...
  7. T

    Is there a VBA code that could convert initials to full names

    Dear Mr Excel, I have a huge spreadsheet that downloads from our data system with staff initials. I need to add all the actual names onto this (firstname, surname), is there a VBA code that I could use to assist with ease? I would be very grateful if someone could assist me with this. Please let...
  8. S

    Cannot assign macro to button

    Hi all, I have an excel workbook called Bill of Materials (BOM), which contains a lot of macros and I have always had buttons call certain macros. My BOM excel sheet basically uses power query to organize data sourced from a workbook called Masterlist and throws it on a new sheet (on the BOM...
  9. D

    Make the code work in a protected sheet

    Hello, I know there's a way of doing it, but I'm failing continually. I have this wonderful VBA that works brilliantly when the sheet is unprotected: Private Sub Worksheet_Change(ByVal Target As Range) Dim Oldvalue As String Dim Newvalue As String Application.EnableEvents =...
  10. S

    How do I automate opening an excel document every 24 hours in the background, refresh connections, save and close the workbook in excel using vba?

    I have a workbook with a connection. I have gone to connection properties and set it to refresh periodically in the background. But I don’t know if it saves the document after the refresh. I don’t think so because the time of last modification of document doesn’t change. So I’m trying to...
  11. J

    Saving email attachments with VBA - code *nearly* working

    Not strictly Excel, but I guess you folks know VBA. At work, I receive steel test certificates by email, and want to automate saving them onto my PC into folders based on the subject of the email, it uses a rule in Outlook to identify the email, then this code to save the attachement(s). At...
  12. welshraz

    VBA - Restrict Code to One Column for Multi-choice Dropdown

    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...
  13. K

    Automate Sorting Row Vertically

    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...
  14. J

    VBA to do certain tasks on file opening

    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...
  15. C

    Highlight 2nd Occurrence of a Specific Character in Cell

    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
  16. H

    VBA and date formatting

    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 =...
  17. S

    VBA sending an email of two conditions are met

    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...
  18. T

    thisworkbook.saved changes inexplicably

    (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...
  19. Worf

    Office scripts, VBA and a text pivot table

    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...
  20. Q

    Excel existing code flaw

    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...

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