vba

  1. D

    VBA Search a range for a value, then copy and paste data only from source to defined cells.

    Hi there, I'm having trouble trying to find a way to populate a spreadsheet with data from an external source. Ideally what I'd like to do, is simply "select all" on a browser window that contains report card style information, and then paste it into a blank section of my excel sheet. What will...
  2. U

    REPT function excel

    Hi, Please I need excel to repeat text in a cell 2x That is REPT(text, 2) IF the text is not repeated, but if it is already repeated 2x, it should not and leave it that way. =IF(B2=REPT(B2,1), B2=REPT(B2,2), B2=B2) It gives me False, then 0 gives me true. Excel formula or VBA would be...
  3. H

    Referencing a series name that contains data linked to a cell VBA

    Hello all, I am trying to format series' line color on a graph. However, when I try to reference the names of the series to format the line color I am getting stuck because the names contain a reference to a cell value on that specific sheet. Each SN (serial number) is on a separate sheet in...
  4. U

    Vba shows total records, instead of record(s) found.

    I have a macro which works the way i want it to except for this part.. Set rng = ws.UsedRange.Columns(1) .Cells(r, "H") = rng.SpecialCells(xlCellTypeVisible).Count it returns y, instead of x in (x of y records found) this happens after autofiltering with vba.
  5. M

    VBA script help for copying same data into different tabs

    Hi there I am looking for help on writing some VBA code for the following. I have an entire data tab (titled "paste 1804") I need copied into 2 different tabs with same format, content, etc..: I have Macro push button labeled "Run data Macro", on a tab labeled "Marcos" Source tab to copy...
  6. U

    Excel Activate workbook1/sheet, Copy/paste row in workbook2/sheet, activate autofilter, return value and loop

    I recorded a Macro, to get this, but the record can't actually work with returning the value and going to the next row on it's own. I'd really appreciate any help. If this can be done with a Formula or VBA macro, i'd greatly appreciate, thanks. Sub MacroTest () ' ' MacroTest Macro ' 'fileX...
  7. R

    Add a code or number at the end of the file name using VBA (Looped)

    Hi Have a VBA code that loops (Through multiple files) and deletes certain cells but I want to add in a addition to the already named file name. I basically need a code to add into the current one and a code that will just add either numbers or letters to the end of the file name. This is the...
  8. Skyybot

    Constant Variable Declaration Issue

    I'm trying to declare a Module level Constant (below). Why does it error? Public Const ps As String = Application.PathSeparator
  9. K

    VBA Novice trying to improve a monotonous work task

    Hi All, first time posting currently as part of my job I create an excel with many tabs... sometimes as many as 150. I have several questions. Firstly, the tab structure is such that the first 8-10 (this can vary) tabs have specific names from there the sub sequence tabs then follow a...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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+...
  15. 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...
  16. 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...
  17. 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...
  18. 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 =...
  19. 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...
  20. 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...

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