How I Made 2 VBA Applications Run Ultrafast

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 พ.ย. 2024

ความคิดเห็น • 53

  • @alterchannel2501
    @alterchannel2501 ปีที่แล้ว +11

    You're my teacher n. 1 for VBA. Please don't stop posting. even if excel has improved a lot, with new formulas, power query and power pivot, we still need our good old VBA !!!

  • @AnilKumar-vi8oe
    @AnilKumar-vi8oe ปีที่แล้ว +6

    Love to see you back again, keep bringing these

  • @Squeeonline
    @Squeeonline ปีที่แล้ว +4

    It's interesting to a see a professionals take on this. The first problem, I would have just filtered the column searching for 0, then deleted all rows, then removed the filter. On datasets of a few hundred rows, this works very fast.

  • @MrStuartAllan
    @MrStuartAllan ปีที่แล้ว +2

    Brilliant video! I always learn something new when I watch one of your videos. If you are able to, could you share the Timer code?

  • @kukuhwahyurinaldi6288
    @kukuhwahyurinaldi6288 ปีที่แล้ว

    It's been a while Mr Paul Kelly, since a last video about Vba. I still need learn a lot from U.. please don't get bored to teach us..
    Thanks🙏

  • @madmaxhaskovo
    @madmaxhaskovo ปีที่แล้ว +3

    Nice video, but may I ask for a link to that Timer class? Thanks in advance!

  • @baphnie
    @baphnie ปีที่แล้ว +25

    If it takes you 4 minutes to loop over 10 rows of data, you don't need a better algorithm; you need a new computer.

    • @Excelmacromastery
      @Excelmacromastery  ปีที่แล้ว +3

      Not to loop but to delete individual rows.

    • @peterhuntervogel
      @peterhuntervogel ปีที่แล้ว +1

      You're missing the point: the time is spent deleting even a single row in a list of "thousands of rows."

    • @sunildhyani904
      @sunildhyani904 ปีที่แล้ว

      😊😊😊😊😊😊😊😊@😊😊

  • @hcandts
    @hcandts ปีที่แล้ว +1

    Great (as always) you shed new light on what we have done by habit

  • @iliesmeziani
    @iliesmeziani ปีที่แล้ว

    thank you very much for this video which is interesting. please can you share with us the excel file of this course. best regards

  • @josephdaquila2479
    @josephdaquila2479 ปีที่แล้ว

    I find it interestinf you seem to get a performance increase by disabling events even if you don't have any actions assigned to those events.

  • @fitosferenc
    @fitosferenc ปีที่แล้ว +1

    I am using this method: Sort, Filter, Delete visible lines exept header, filter off: ActiveSheet.UsedRange.Offset(1).SpecialCells(xlCellTypeVisible).Delete Shift:=xlUp

  • @bestoptimate
    @bestoptimate 3 หลายเดือนก่อน

    Mr. Paul, I find your videos very helpful in my tasks.
    Can I ask a question? My dataset column 'D' has integer values in it, along with zeros in some cells. How can I force the Find function to just look for '0' in whole cell, instead of looking for '0' in figures say 76,000?

  • @BenLinfordUK
    @BenLinfordUK ปีที่แล้ว

    Lovely, Paul, and pretty ironic as I put together a very similar routine yesterday, except I captured an array of the values across all columns within the records with the same 'famCode'. Then I looped across the rows in each column of that array, storing the first value as the string for comparison and comparing each subsequent value within that column of the array against it. If it didn't equate to the comparison string, I mapped out that column in the array to the equivalent range in the worksheet, applied formatting to highlight and exited out of that column to resume looping.
    Very much inspired by your Array-Dictionary combination techniques for speed.
    🤩🙏

    • @Excelmacromastery
      @Excelmacromastery  ปีที่แล้ว +1

      That is a coincidence. Thanks for the feedback Ben.

  • @LoneIcon
    @LoneIcon ปีที่แล้ว

    In your 2nd topic, i think using the Dictionary method is the best option in an instance when "Count FC" inidcator isnt present.

  • @SolutionsByPVV
    @SolutionsByPVV ปีที่แล้ว

    Thank you, Paul!
    I would like a tutorial on VBA interaction with messengers: Telegram, Viber, WhatsApp. Your best practices on this topic.

  • @michaelangellotti5741
    @michaelangellotti5741 ปีที่แล้ว +1

    Your work is excellent. Thanks for sharing.

  • @renziair
    @renziair 4 หลายเดือนก่อน

    I think this can also be done using Union and delete all the 0's at once. Sorting won't be required.

  • @munshirasimraja5713
    @munshirasimraja5713 ปีที่แล้ว

    Thanks for wonderful technique that save a lot time.😊

  • @ousmanetall1286
    @ousmanetall1286 ปีที่แล้ว

    Hi Paul, I am from Senegal. I really appreciate your sharing knowledge. However, I would like to know how I can't subscribe through payment by card from my country to get more of your lessons.

  • @mathijs9365
    @mathijs9365 ปีที่แล้ว +1

    Create table. Load in power query en load back in Excel.

  • @ZoltanGrose
    @ZoltanGrose ปีที่แล้ว

    I’m wondering if the external workbook references is what was making the Delete slow if the workbook isn’t open…

  • @Bhavik_Khatri
    @Bhavik_Khatri ปีที่แล้ว

    Excellent tutorial!

  • @thiyagarajan1989
    @thiyagarajan1989 10 หลายเดือนก่อน

    Can you Upload Sample Data- Excel Sheet ...Which will help many people....

  • @SolutionsByPVV
    @SolutionsByPVV ปีที่แล้ว

    Paul, link please file from this tutorial to download.

  • @CB27
    @CB27 ปีที่แล้ว +1

    1st example, why not simply Data/Filter/Autofilter for zeros and then delete the filtered rows?

    • @Excelmacromastery
      @Excelmacromastery  ปีที่แล้ว +1

      It is slower than the method I used.

    • @CB27
      @CB27 ปีที่แล้ว

      @@Excelmacromastery ah yes, I fell into the trap of thinking what's easiest when doing it manually through the UI. Execution wise, I can see how your method would be faster.

  • @ManojYadav-nt2rm
    @ManojYadav-nt2rm 4 หลายเดือนก่อน +1

    this is not the great solution without toucing the data you shld make the code run faster

  • @jonelatendido9836
    @jonelatendido9836 9 หลายเดือนก่อน

    Please give the files, Or Just the code in a texf files, it would help a lot..

  • @edysaputratech3645
    @edysaputratech3645 ปีที่แล้ว

    How to scrape data from web with login

  • @ManojYadav-nt2rm
    @ManojYadav-nt2rm 4 หลายเดือนก่อน

    it looks like you dont like the for loop in your code.

  • @DimaEarth
    @DimaEarth ปีที่แล้ว

    Заметил русское название файла))

  • @TravisFX
    @TravisFX 11 หลายเดือนก่อน

    Hey man.. So call me late to the party, but is vba seriously dead with subscr online ver of MS365? Even the paid version? Am lookin to finally upgrade my old excel version...Reading all about the benefits of buying the subscription MS 365 office vs the old one time buy/install version. No create or run any vba at all? How is that possible with millions of vba files out there. I hear office 365 excel desktop ver still does vba...But whats the point...u cant give it to someone using 365 online?!!

    • @Excelmacromastery
      @Excelmacromastery  11 หลายเดือนก่อน

      MS365 I'd subscription based with updates where as Office 2021 is once off payment.
      Both are desktop versions of office. 365 includes an online version of Excel.
      Online isn't replacing desktop. It's just an alternative way of editing an Excel file.

  • @tonynichols1638
    @tonynichols1638 ปีที่แล้ว

    Mn

  • @TP-om8of
    @TP-om8of ปีที่แล้ว +2

    Take home message: MS Excel is a dinosaur.
    (You could have read the data into an array and done the deletion there, on the first one too. Why didn’t you?)

    • @quench100
      @quench100 ปีที่แล้ว

      I had a sheet with 16,000 rows with a similar problem. I tried both methods: delete via array, and delete after sorting. Sorting is way faster, especially when the cell contents are formulas.

    • @Excelmacromastery
      @Excelmacromastery  ปีที่แล้ว +2

      The solution required keeping the formatting of the records and because sorting was faster.

    • @TP-om8of
      @TP-om8of ปีที่แล้ว +1

      @@quench100 How about Power Query. It would be fine befire more. You opened the VBA editor.

    • @quench100
      @quench100 ปีที่แล้ว

      @@TP-om8of I've never used Power Query, I'm using Excel 2013.

    • @mathijs9365
      @mathijs9365 ปีที่แล้ว

      Yep. Power Query is an ETL programm. Perfect for cleaning data.

  • @ganeshs1360
    @ganeshs1360 ปีที่แล้ว

    =MIN(FILTER($C$2:$C$1048576,$B$2:$B$1048576=b2,""))
    but its always good to know a new VBA approach.