long

  1. E

    Regression Macro Stops Unexpectedly

    Hello, I created a macro to run a linear regression automatically, and when I execute the code it works properly. However, when a coworker tries, it is as if the macro stops unexpectedly with no error or anything. It just doesn't continue on. This is a snippet of the code. It completes the...
  2. U

    Macro stops at this line: Public Declare Function apiShowWindow Lib "user32"

    My hard drive crashed and now my macros will not work. I believe I need to go to Tools and References but what do I need to add for this line? Public Declare Function apiShowWindow Lib "user32" Alias "ShowWindow" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long I am running Windows 10 64...
  3. A

    Parse email address from long strong

    Hello I have a long string of email addresses - in the hundreds that are all in one line. They are bracketed by <> and separated by ;. How do I parse them into their own cell? Example: Fred Johnson<fred.johnshon@bla.com>;Jaime Post<jpost@yahoo.com>'......... I want to turn into...
  4. D

    Type mismatch

    I have this code that is run once a command button is clicked: Sub cmdSend() Application.ScreenUpdating = False Application.EnableEvents = False Dim desWS As Worksheet, srcWS As Worksheet, clientWB As Workbook Set srcWS = ThisWorkbook.Sheets("NPSS_quote_sheet") Set...
  5. M

    VBA - combining rows

    Hi guys Probably quite a simple fix for someone who knows VB. I found a really useful macro (thank you hiker95) on this site for combining multiple rows with a unique identifier. It's configured to combine the first 2 columns of each row after the unique ID in column 1. All I need it to do is...
  6. D

    Transfer multiple Userform Textbox value to cells/columns

    Hi.. I have this code below that transfer my "Textbox1" to "Textbox20" to column A. I have another set of Textboxes ("DataBox1" to "Databox20") that i need to transfer to Column B. can anyone help me on this. Thanks Dim lrow As Long, i As Long lrow = Cells(Rows.Count, "A").End(xlUp).Row +...
  7. A

    Copy from Array and paste to different array

    Hi guys, what am i doing wrong here ? Private Sub CommandButton1_Click99() Dim LR As Long, i As Long, cls cls = Array("B2", "D2", "C2") With Sheets("Sheet2") LR = WorksheetFunction.Max(2, .Range(Array("H1", "K1", "Z1"))) For i = LBound(cls) To UBound(cls) Range(cls(i)).Copy...
  8. B

    Copying Rows With Highlighted Cells Multiple Columns

    Hello, I have this code that extracts rows with highlighted cells based on which column I point to. Right now it points to column "C". My data range spans from Column C through Column N. Each time I run this code I manually change column reference. Highlighted cells can be found anywhere...
  9. J

    VBA: Append rather than copy over

    Hello I have the following code which copies from one sheet and pastes from Row 8 in the next. Each time I run the macro it copies over, I would like to change it to append the data. Any thoughts, thanks. Sub Add_to () Application.ScreenUpdating = False Dim i As Long Dim Lastrow As Long...
  10. T

    If ... then or Select Case ?

    Hi Guys, Does anybody have experience which is quicker - long (If Then Else) construction or (Select Case) ? Thanks in advance. Regards
  11. W

    EXCEL VBA Find Headers and Copy Column from Sheet 1 to Sheet 2

    I want to copy data from Sheet1 to Sheet2 based on headers in two sheets. The following code works great when both sheets’ headers are in first row. My question is if header in Sheet2 is in row 8, then how would my code be? thank you. Sub CopyData() Dim sws As Worksheet, dws As Worksheet Dim...
  12. DataBlake

    Get the last column of a selection

    I want to store lastCol as a variable equal to the last column in the current selection Sub selectionEDIT() Dim sSelect As Range Dim lastCol As Long Dim lastRow As Long Set sSelect = Selection lastCol = sSelect.SpecialCells(xlCellTypeLastCell).Column lastRow =...
  13. A

    Cut & Paste VBA

    Hi, I am new to VBA, getting a bit of a hang of it. I found this code via forums etc. Sub Delete_Data() Dim i As Long, lastrow As Long, mydate As Date, erow As Long lastrow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).row Application.ScreenUpdating = False For i = lastrow To 2 Step -1 mydate...
  14. M

    Calculations based on criteria in another cell

    Please can someone help with a script - if column 'O' = .29 then in column 'I' = H/60 if column 'O' does not = .29 then column 'I' = 'H' Then 'J' = 'I' * 'k' The spreadsheet is very long so it should work for all lines in the spreadsheet Thank you
  15. N

    VBA to delete rows with a formula that equals blank

    I've created a button that incorporates a bunch of functions. Everything is working, but the process started taking an extremely long time after I added the function below. What I'm do with this function is deleting all of the rows that have formulas in them that end up equaling a blank cell...
  16. DataBlake

    Most Effective Multi-Column Delete Row Filter [VBA]

    what would be the most effective way i could filter every column for the same criteria? so far i can think of the below sub i made, but it doesnt seem to be that efficient if multiple columns contain the criteria. If you could help me to understand another method i would greatly appreciate the...
  17. J

    add rows at the end

    Hi everyone. This macro appends 2 rows after the non-blank rows at the end. can I change to increase the rows to 4? Option Explicit Sub aggiungi_copiaformato_new() On Error Resume Next Dim n As Long Dim x As Long ActiveSheet.Unprotect "987654"...
  18. R

    Longest Column not finding last couple of rows

    Good morning/afternoon. If someone has some time to help, I would appreciate it. :) So, I've been using this code to find my longest row/column range so I can put 'all borders' around each cell in that range. However, on this last report, it doesn't seem to see the last two rows. Not sure...
  19. J

    Poisson Data by Long Method - UDF Error?

    I am trying to convert a C language code to VBA. The converted VBA UDF code is: Public Function Poisson2( _ Optional ByVal C As Double = 4) As Long If C <= 0# Then Exit Function Dim d As Double, beta As Double, alpha As Double, k As Double, u As Double, v As Double, x As...

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