long

  1. K

    Not understanding my own VBA code..HELP!

    Hi guys, I'm new here and very new to VBA (just know the bare basics) -- nice to meet you! I wanted to create a code to insert a blank every 10th row and after copying and pasting bits and pieces of other people's codes, I finally got the code to work...but I'm not sure how this is working and...
  2. D

    Query Refresh in VBA - is taking so long that the copy/paste after it copies old data

    Building a macro that will refresh a query (with existing extension), take the results (anywhere from 50,000-100,000 lines), and copy to a different spreadsheet. The macro works, but the query refresh takes so long that the macro moves on without waiting for it to finish. Is there a way to...
  3. J

    VBA - Slicer Selection

    I am trying to get a worksheet to only select 4 criteria from a slicer that has over 100 options in VBA. I tried the method of just recording a macro but that was too long of a command and quit. Does anybody have any code that I could adjust / alter to get me in the right direction? Thank you.
  4. R

    Logic Eluding Me (OptionButtons)

    Hi Folks, I'm trying to get a process involving OptionButtons to work, but the logic is eluding me (been struggling with it on & off for several days). I'm hoping someone here can help/nudge me in the right direction... On a UserForm, I have a Frame containing several (10) OptionButtons. The...
  5. DataBlake

    How To Delete Column S to Last Column?

    I have this code and its not working, can anyone explain to me why? sub test() Dim lastCol As Long with activesheet lastCol = .Range("A1").SpecialCells(xlCellTypeLastCell).Column Columns(17 & ":" & lastCol).Delete Shift:=xlToLeft end with or sub test() Dim lastCol As Long with...
  6. J

    Why does this formula take so long???

    =Countif($a$2:$a$150000,a2) So when copied down in B and pressing F9 takes litterally 10-15 mins to calculate.. I have used this before and it didnt take this long? any suggestions as to why? or an alternative to achieve the same result? thanks J
  7. 2

    Overflow Query

    Hi, I was hoping someone might be able to explain this to me. When I execute the following code (which simply calculates a value, and using debug.print, outputs the result), I get a Run-time Error '6' Overflow message. Sub calc_ulation() Dim x As Long x = 1000 * 60 Debug.Print x End Sub...
  8. D

    VBA and formula

    Hi all I have a spreadsheet with over 5000 records however I need to do very little with some of them so I am looking for a VBA to do a lot of my work for me. I have made a start but with little success. Basically, I want to run the VBA to take the following actions: 1. Delete Rows if Column F...
  9. Nelson78

    Delete entire rows if ...: how to speed up the process?

    Hello everybody. I have 500k rows to check. If cell "H" is not beginning for "CODE", then delete entire row. How You can imagine, with a such amount of rows the process takes too long. How can I speed up? May be with a REGEX strategy? Sub deleterows() Dim rw As Long With...
  10. M

    Sorting macro with arrays won't move the first row of data nor retain leading Zeros

    I'm using an array that converts two columns into different string arrays and sorts the row based on the contents of the arrays to a different worksheet. The sorting code works but skips the first row of data whilst also removing the leading Zeros. I already have a working code that loops...
  11. R

    OptionButton: Boolean vs Long, and why -4146?

    Hi Folks, I've been doing some reading up on the Multiple UserForm Controls with One Event Handler concept, and a few questions have arisen... :confused: Some (most?) of the articles I've read talk about using Long variables vs. Boolean to hold the value of OptionButtons & CheckBoxes. The...
  12. M

    VLookup in userform with Combox as look up value

    Hi, I have a userform and i want to populate a frame with text from a worksheet called "interpretations" using a command button to reveal. I have two comboboxes (cboxmajor and cboxaoi2) and the value of these combined is what i want the VLookup to search for then use the column next to that...
  13. A

    help code transfer data from sheet to another sheet

    hi guy i hope help me the code is somthing wrong i try to transfer data of invoice from sheet1 to sheet 2 but give me this mistake RED LINE AND GIVE ME RUN TIME ERROR13 Option Explicit Sub transferData() Dim i As Long Dim lastrow As Long Dim erow As Long lastrow =...
  14. P

    How do you calculate the size of an array?

    Here's an array I'm using: Dim Array (1 to 4, 1 to 400000, 1 to 12) as long How big is this array? How big would it be as a double or string array?
  15. A

    Excel Cannot Complete this Task with Available Resources VBA error

    Hi All, I am getting an "Excel Cannot Complete this Task with Available Resources" message when I attempt to run the below macro. The issue only occurs if I paste 1 line of data in the macro workbook If I have more than 1 line, everything runs as I expect. In my code below, is my If...
  16. B

    Volume Control - Wave Input Control

    Hello I hope someone one can help: I want to try and achieve a code that will allow the Main volume to stay at Max but turn the Wave Input Volume (Sound from a website/Spotify etc) within the Mixer down individually when I play a sound through Excel. The code I have only turns down the...
  17. M

    Excel crashing during VBA procedures

    I have a module called UpdateCheck with procedures which check another document to see if the version number has changed. If it has, it asks the user if they want to update the document to the new version. This is only to update the modules because the formatting of the worksheets is set in...
  18. S

    Vba code for table formatting

    Dear Team, I need outside border of table white and alternate rows having interior color RGB (211,217,,222) Please help with the following vba code. Sub All_Tables_All_Sheets_New() Dim T As ListObject Dim c As Long Dim i As Long For i = 1 To Sheets.Count For Each T In...
  19. O

    Fill in cells based off VBA User Form input

    Hi all, I've created a User Form that loads up upon opening up my spreadsheet. My goal is to take that user input and have it be placed in cells appropriately. Here's my form fields: First/Last Name Account Number Payment Amount Due Date # of Coupons The user inputs data into this form...

Some videos you may like

This Week's Hot Topics

Top