vba

  1. R

    Trying to write VBA script for the choosecols and filter function in Excel

    Hello, I’m trying to write a vba script to return all columns that match a list of numbers. Some numbers have multiple rows of data. I use the choosecols and filter function to return the data which works. Now I’m trying to write a VBA script that does the same thing. Problem now is that it’s...
  2. R

    VBA Code for pasting Value every nth cell in 2 different rows

    Hi there, I'm a bit stuck on some VBA code and need some help! I want to create some code for a macro button that will auto populate a value from cell A1 in cells Q19 and AJ19 and carry on doing this every 14 cells in both columns. It would be great if the VBA loop ends at row 355 as this is...
  3. M

    Cut/paste last 36 rows and move to a new worksheet

    Hello - newbie here. Using VBA, I need to cut the last 36 rows of data and paste them to a new sheet. The actual number of rows will vary each time we use the sheet. Any help would be greatly appreciated!
  4. E

    VBA -highlighting rows when a condition is met

    Morning I have a code that highlights rows when in column B the word red is inputted, however, I need the code to work when I press enter is that possible Sub HighlightRowsWithRedInColumnB() Dim ws As Worksheet Dim lastRow As Long Dim i As Long ' Set the active sheet...
  5. R

    VBA Script for copying a range of cells from multiple worksheets into one worksheet?

    Hi all! Knocking out a huge project for work and I'm looking for anything to save time. I have successfully imported ~100 workbooks into a single workbook as sheets, labeled "3" to "103". From each of those ~100 sheets I'd like to copy the data in cells A11:Ax, C11:Cx, E11:Ex, and I11:Ix (from...
  6. D

    vba code to refresh a connection only query

    Hi am am trying to see if there is vba code to refresh a query that is a "Connection Only" i have the below code i am using but i am not seeing the query refresh when i go step by step in the code Sub RefreshSpecificQueries() Dim queryList As Variant Dim i As Integer Dim conn As...
  7. K

    VBA change the font of the first letter only in each cell in a range to a specific font

    I'm trying to use the following code to change the font of the first letter only in each cell in a range to a specific font (which is a pie chart font) so that it appears a pie chart and then a value: Sub Set_Pie_first_char() Dim r As Range With Range("e27:i27") For Each r In .Cells...
  8. Agnarr

    Checkbox Timestamp with VBA

    Hello everyone! I have a huge problem. we utilize a "to-do" list with checkboxes that are inserted into each new sheet with the following code: Sub InsertCheckBox() Dim rng As Range Dim chkBox As CheckBox Dim cell As Range Dim i As Integer ' Set the range where you want...
  9. N

    Pasting Value with VBA - Sorta Looping based on a multiple of 30

    I want to create a VBA code that pastes different columns within a row to a pdf, then move to the next row and do this to 30 different rows. Then I want it to save the document then continue from where it left off. Therefore, after 30 rows have had their columns pasted into the text boxes within...
  10. K

    Text format for numbers to preserve trailing zeros

    Hi All, I am a newcomer here. I found an old question which I am interested to. https://www.mrexcel.com/board/threads/text-format-for-numbers-to-preserve-trailing-zeros.811427/ I ask anybody to write a Sub file to apply this Function published there...
  11. K

    VBA deleterows

    Hi, I just wanted to ask how can I retain the rows if column F or StartString(Font in red) starts with number. Below is my code. Sub DeleteRowsraw() Dim c As Range, DeleteRange As Range, DataRange As Range Dim LR As Long Dim i As Long Dim StartString As String 'change...
  12. W

    Excel VBA/Macro Help

    Hi Everyone, I have an online appointment scheduler, using "https://www.squarespace.com/acuityscheduling". So far I have been manually copying all of the client information manually. Below is the information I gather manually from the website and put in my excel sheet. Is there a way I can...
  13. G

    Still no solution after 1 Year - Please Help

    So the short version is: I have a tool that makes signs for items. The paper it prints on is divided into 8 signs. (8.5x11 Sheet) I have tried every different option to get it to print properly and I cannot. Each page should have 8 signs. I keep getting overlap or width issues. ("A1:BM99")...
  14. D

    Create empty table (with headings) in Word document after some text

    Hi guys, I hope this is the right forum for this question. I'm fairly competent in VBA in Excel, but recently started tinkering with creating letters in MS Word from our Excel VBA programmed management system. I work in Microsoft 365. I'm creating a Word document from scratch (out of Excel)...
  15. M

    Find Function VBA Named Argument Not Found-Runtime error 448

    I am writing a macro( late binding) that runs through a word document and highlight all the values that is contained in my cell range in Excel. I have used the find function which works fine until I add the argument IgnoreSpace:= True, which I don't understand why it's resulting in error...
  16. J

    Excel VBA .Save Causing a Save As to 'Random' number filename

    Hello, I have several VBA macros that have been working great for years. Recently I've been seeing problems when they call the .Save method. It seems to save the workbook but then also have some kind of catastrophic error where it tries to save the file as a random (only say random because I...
  17. C

    VBA: open and copy data from multiple (txt. files) to excel

    hi, need macro to open and copy data from multiple txt. files (exactly i need direct 35 values(years)) to excel. I did macro for one year, but im struggling to do it for 35 years, can someone help me with solution please? Sub txt_to_excel() Dim X As Double Dim TXT As String ' Adresss Open...
  18. S

    VBA : Allocate Data Randomly and Evenly

    Hello Good People, I have this allocation workbook that when I click a button. It will randomly divide the list of data into 8. (Currently 8 but it will soon increase). I have attached a sample images for my 2 sheets. Persons sheet - List of data Teams sheet - Output of allocation However...
  19. I

    Hopefully a simple find and replace VBA script

    I have the following data (before.png): I would like to have a VBA script which runs through column A looking for a carriage return. Upon finding one, it copies that entire row but only with everything PRIOR to the carriage return - it will make a new row for each iteration. It will then add a...
  20. S

    vba logic to open up several files within a folder and perform 2-3 steps

    Hello. I am trying to do the following. Within c:\123 folder. - i have 100 files. I need vba code to open up file 1, perform a few steps, remove a tab, rename a tab, autofit the columns, save and close, and then loop to the next file until file 100 is completed. I have the following code which...

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