Search:

Type: Posts; User: JackDanIce; Keyword(s):

Page 1 of 6 1 2 3 4

Search: Search took 0.26 seconds.

  1. Replies
    6
    Views
    84

    Re: Excel 365 Macros running slow

    The GRT_1 is a named range and always 37R x 39C and there are about 40 in total, however, I'll try the debug.print suggestion, thank you.

    I just paused it and it's been running for about 3 hours...
  2. Replies
    6
    Views
    84

    Re: Excel 365 Macros running slow

    Thank you for posting, it's not code optimisation though, it's the same code I had last week that ran much much faster.

    Now it's running very slowly and unclear why. Right now code is still...
  3. Replies
    6
    Views
    84

    Re: Excel 365 Macros running slow

    Additionally, file is saved to desktop, opened in app and autosave is disabled.

    Ran twice just now with run-times: 50 seconds, 1min 5 seconds

    Output is 41 rows x 3 columns, not a large range
  4. Replies
    7
    Views
    84

    Re: VBA Copy Non Contiguous Columns

    Try:

    Sub Copy

    Dim LR as Long
    LR = Application.Max(Cells(Rows.Count, 2).End(xlUp).Row, Cells(Rows.Count, 4).End(xlUp).Row)

    Range(Replace("B2:B@,D2:D@", "@", LR)).Copy...
  5. Replies
    6
    Views
    84

    Excel 365 Macros running slow

    Hi,

    Since yesterday, I've noticed a number of macros running slower than before. I was using Excel 2013 and about a month ago upgraded to Office.365

    I have a range A1:AK39 where

    A1 = Table...
  6. Thread: VBA Loop

    by JackDanIce
    Replies
    4
    Views
    65

    Re: VBA Loop

    You're welcome
  7. Thread: VBA Loop

    by JackDanIce
    Replies
    4
    Views
    65

    Re: VBA Loop

    Try:


    Sub m1()

    Dim LastRow As Long
    Dim x As Long
    Dim y As Long
    Dim z As Long: z = 1
  8. Re: Copy/Paste from one workbook to another 2 workbooks with range

    The VBA project is locked so can't determine what test33.xlsm is doing nor can interact with the code to see why it doesn't open files.
  9. Replies
    13
    Views
    315

    Re: copy based on NAMES instead of ID

    You're welcome, glad it's resolved
  10. Replies
    13
    Views
    315

    Re: copy based on NAMES instead of ID

    Not sure what you mean, but perhaps:


    r.Resize(, uBound(b)).value = b
    r.Offset(1).Resize(, uBound(a)).value = a

    r is the cell you are writing contents of array b to, then your code is...
  11. Re: Copy/Paste from one workbook to another 2 workbooks with range

    It works for me when I mock some test files up. Without your files, I can't determine the cause of error.
    [/COLOR]
  12. Re: Copy/Paste from one workbook to another 2 workbooks with range

    Is the destination sheet named Sheet1 in the workbook that is open?

    If this gives the same error, without your files difficult to diagnose:


    Private Sub CommandButton1_Click()

    ...
  13. Replies
    13
    Views
    315

    Re: copy based on NAMES instead of ID

    [Untested] Replace all of the code with below and try:


    Sub LTF()

    Dim sFolder As String
    Dim sFile As String

    With Sheets("copy").Cells(2, 11)
    If Len(.Value) > 0...
  14. Re: Copy/Paste from one workbook to another 2 workbooks with range

    You can't update a closed workbook, you have to open it, paste the values, then close it.

    Replace all of your code with below and try:

    Private Sub CommandButton1_Click()

    Dim...
  15. Re: Copy/Paste from one workbook to another 2 workbooks with range

    Is Book17 the active workbook?
    Is Book16 and Book18 both open when you try to run the macro?

    If yes to both, then try:


    Private Sub CommandButton1_Click()

    With...
  16. Replies
    13
    Views
    315

    Re: copy based on NAMES instead of ID

    Can you post your full code?
  17. Replies
    13
    Views
    315

    Re: copy based on NAMES instead of ID

    Try replacing in above code with:

    For Each cell In wbtarget.Sheets(1).Range("ID", "Name", "class", "div", "sub1", "sub2", "sub3", "sub4", "sub5")
  18. Replies
    5
    Views
    185

    Re: Repeated cells in same column VBA

    Change parts in red to suit:


    Sub M1()

    Dim v As Variant
    Dim x As Long
    Dim i As Long

    Dim srcSheet As Worksheet
  19. Re: Pivot table auto refresh, live dashboard update

    Thanks and you too!
  20. Re: Pivot table auto refresh, live dashboard update

    Used Insert Table to define the data table, used it to create a pivot table (slightly manipulation through power query) and the pivot table now does update when I change a variable to the data table....
  21. Re: Pivot table auto refresh, live dashboard update

    Thanks for suggestion sandy666, however,

    PivotTable Analyze ->Data -> Refresh but Connection Properties is greyed out.

    Data table is "static" (apart from rows with formulae) from which I have...
  22. Pivot table auto refresh, live dashboard update

    Hi,

    I have a data table turned into a pivot table. I want to use this pivot table to drive a dashboard (i.e. slicers, timelines other interaction)

    A user needs to be able to change variables...
  23. Replies
    5
    Views
    185

    Re: Repeated cells in same column VBA

    You're welcome, glad it's resolved :)
  24. Replies
    5
    Views
    185

    Re: Repeated cells in same column VBA

    Try:


    Sub M1()

    Dim v As Variant
    Dim x As Long
    Dim i As Long

    x = InputBox("Enter repetition value: ")
  25. Re: Adding Cricket Overs with VBA with parameters

    Input is a range of values and it will fail if value after "." is > 5, try:

    Function AddOvers(ByRef rng As Range) As Double

    Dim r As Range
    Dim v As Variant

    For Each...
Results 1 to 25 of 150
Page 1 of 6 1 2 3 4