vba

  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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")...
  11. 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)...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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...
  17. 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...
  18. outlawspeeder

    VBA Is there an easy way to recreate new pivot charts

    I building a way for a worker to paste 5k line of info, clean it of $^!$@#$^% and then build a pivot charts (more than one) I recorded making a Pivot chart. It names the the chart +a number. Mine as recorded is 4. If I use this code again I get an error. I tried make a variable and replacing...
  19. J

    Automatically setting filters based upon user selection criteria

    Hi, Note: I'm not a VB expert or even a beginner, so I may get the wording wrong so apologies and thanks in advance: Background: I have 2 x sheets, called: • Master: This is a front menu page that all users see that contains an image (4 Pillars) as per the example: • Each Pillar...
  20. N

    VBA Question

    Hello, I have posted my excel VBA code below, I made it so when I double clicked on cells AP6:AP85 the user would be prompted to choose "Fixed" or "Variable" to use in subroutine get_supplier_rate. But when a user picks Fixed or Variable it replaces the original numeric value that was in cells...

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