vba

  1. B

    Rename Multiple Work Sheets using Macro based on a single Data Validation Drop Down in one Work sheet.

    Hello, I work for a construction company that does a variety of different projects, and we are trying to streamline our bidding document to cover all city locations as well as all types of projects that we construct. I am trying to create a VBA that renames the worksheet tabs based on the type...
  2. A

    Autofill multiple formulas in columns down to the last row with data in it in column B - ignores column B entries

    Hi I have different formulas in 1106 columns relating to the 1st row (Column B) There are up to 500 rows where data can be put in. This can lead to a lot of formulas, as I have up to 20 sheets of this. The 500 rows are not always used, and I do not want unused formulas in the sheets this is an...
  3. tlc53

    VBA Error if more than 1x spreadsheet open

    Hi, I have code in my main spreadsheet which works fine, no problems at all, until I open another spreadsheet. If two or more spreadsheets are open and I do anything in any of the spreadsheets (select from drop down menu for example) it produces "Run time error 9 - Subscript out of range"...
  4. V

    VBA code works in Excel 2010 but not in Office 365

    I have this vba code that I was running previously in Excel 2010 on windows 7. In a nutshell the code is creating a new worksheet and is copy and pasting the recordset into the new worksheet. Then the code will do a lookup and insert new data into that same worksheet. Recently, the business...
  5. G

    Macro to follow Hyperlink with Ampersand in folder name

    Hi I have created a macro that is set to follow a hyperlink to a folder named, c:\products\Weight&Dimensions. My macro seems to stop at the '&' sign, causing an error as it is looking for a folder called c:\products\Weight. I can't remove the ampersand, so how can I get Excel to understand...
  6. T

    Copy and Paste Rows Between a Recurring Value in Column to Worksheets

    Hello, I'm real new to VBA but I am actively trying to learn so I can automate some weekly tasks I have at a new job. Not money for classes so I am trying to do what I can to teach myself. Currently, one of my tasks has a master workbook with detailed breakdowns of payment for multiple...
  7. 3

    Add a trailing space

    Hi Guys, I have a piece of code which looks like this in order to remove all spaces within text: ActiveSheet.Range("K1:L5000").Select Selection.Replace What:=" ", Replacement:="", LookAt:=xlPart I then need to use the same selection and add in a trailing space back onto the end of the text...
  8. Dave_O

    VBA: Excel Uppercase words between HTML <strong>

    Hello, I am saving a website's source code as a text file, then importing it into a worksheet. I currently use a UDF to vbCrLf existing Uppercase word's, but I would like to make all words Uppercase between <strong> .....<\/strong> I am OK with either VBA or UDF. SAMPLE: As is...
  9. N

    Excel Live Data Refresh - Stop all popups and errors

    Hi All, I am pretty amateur at Excel VBA, so please bare with. I have an excel workbook, this contains lots of worksheets with live data in SQL. The issue I have, is each worksheet is set to data refresh every 5 minutes, independently. Sometimes when it refreshes, it will give an error about...
  10. K

    Copy Multiple Files from Absolute Paths to SharePoint with Same File Names

    Hi, Firstly, I apologise if this has been answered multiple times but my google searches, although provided ideas, have produced as many questions as answers. In the Excel file where the code resides, I have an excel table that has a list of absolute file paths (SharePoint). They are in...
  11. N

    For Mass email using custom body range

    Sub Send_Mails() Dim sh As Worksheet Set sh = ThisWorkbook.Sheets("Send_Mails") Dim i As Integer Dim customBody As Range Dim OA As Object Dim msg As Object Set OA = CreateObject("outlook.application") Dim last_row As Integer last_row = Application.CountA(sh.Range("A:A")) For i = 2 To...
  12. 3

    VBA - Combine Multiple workbooks into 1 worksheet

    Hi, I am trying to write a VBA script which will combine multiple workbooks into 1 worksheet, copy and pasting all columns as values. Each sheet from the multiple workbooks should be pasted below the last, and ideally there would be the workbook name pasted into column A of the master as a...
  13. B

    Integrate VLOOKUP in VBA

    Hello everyone, I have a workbook with two worksheets namely "1" and "Sheet1". I would like to write a macro which integrates the VLOOKUP function. My working function is as follows: =IF(H2="";"";VLOOKUP(H2;Sheet1!A:C;3;False) but I am kind of stuck with how to get it to work in VBA. In...
  14. B

    Text to columns to a different sheet using VBA.!?

    Hi people, How do I split text from a range in a column (maybe using text to column, separator "x") to a different worksheet and rearrange. To make you understand better here is a image of the source data(Sheet1) My expected output is something like(Sheet2): I've done Sub customSplit()...
  15. D

    VBA ListBox variable/object type

    Hi all, I have a UserForm with a ComboBox and a ListBox on it; their respective names are "ComboBox_Field" and "ListBox_Value". Their list values are currently strings, but might be dates or integers as well. Now, I have a function to count the number of selected items in a ListBox...
  16. O

    Multiple Hyperlink/VBA Query

    Hi All I was just wondering if anyone could help me with a Multiple Hyperlink/VBA query. I've tried multiple methods but none seem to be working. I have a list of names where I want there to be a hyperlink option next to each individual name that will take the user to another page when...
  17. M

    Copy Two Columns from One Table and Paste in Second Table

    I have table tblActivties on sheet Activities and tblTrainingLog on sheet TrainReg. I want to copy two columns from tbleActivties and paste them in the corresponding columns on sheet TrainReg. The amount of columns to copy is known and the number of rows to copy in tblActivities in unknown (last...
  18. G

    VBA Copy data to another work book based on CONDITIONS

    Hi Team, I would like to copy data from one work book to another. The data has to be copied from BookA to BookB. However, the issue is that I am not allowed to edit the vba in BookB. Book A has a list of names and their forecasts. Book B also has a list of names and forecast but it also has a...
  19. J

    VBA - Select Range for Pivot Table (Not including Last Row)

    Hi Excel Experts, I would like to have your advise on how to select range for a pivot table that not including the last row because it is the "Total". I tried below methods but not worked. 1) This method will including the row 6 (Final row-Total) Selection.End(xlDown).Select...
  20. D

    VBA Help - password protected, need to be able to use filters

    Hi all, self-taught very basic coding (mostly from this website!!) so any help would be appreciated! I have a multi-sheet workbook that is used by many members of my department. I have a lot of formulas and conditional formatting on one of the tabs so I have it password protected, but users are...

Some videos you may like

This Week's Hot Topics

Top