Posts

Showing posts from February, 2019

VBA Paste Into Visible Cells only Optimisation

Image
1 0 So i wrote code that pastes a copied range from the clipboard into the visible cells only starting from the active cell the user marked I already optimized my code somewhat speeding it up from 7200 Cells/min to 42000 cells/min but i think there still is plenty of room for optimization. But due to the fact that it is the third day programming VB for me i am asking the community for useful tips n tricks for making my code faster The way i handle it is that i paste the clipboard into an new worksheet and then search the next visible cell to insert into i use the variable max length to "limit" the search but in my application thousands of cells may be invisible. I thought about using a StringBuilder to make it run faster but have no Idea how to implement that important is that both rows and colum

How to return the difference between two arrays containing strings [duplicate]

Image
0 This question already has an answer here: How to get the difference between two arrays in Javascript? 60 answers So I let's say I have an array like this: ["one", "two", "three"] And then I have another array like this: ["one", "two", "three", "four"] I need my function to compare the two arrays and return "four". For example, I want the function to do nothing when the array does this: ["one", "two"] But again, I want the function to return the difference when the array goes back to this: ["one", "two", "three"] I've been playing with array.filter but so f