« first day    last day (818 days later) » 

2:25 AM
I'm a little late to the SendKeys party, but I'd concur that it's just not really good programming, it is (literally) imitating keystrokes and mouse-clicks. In this regard, I think it's actually worse than the Macro Recorder (which is detestable for the same reason, but its salvation is that at least it shows you the object-oriented stuff and goes overkill on like, default values/parameters, etc.)
If you want to play with VBA on Stack, look for the Non-Excel questions :) They're of course fewer and far between, relatively, but they're usually more interesting if for no other reason than it's not a 1,000th duplicate "copy rows", and far more likely to be something that I can't answer without an IDE or Dox.
 
 
2 hours later…
4:03 AM
>Is there an Excel-related forum anywhere that isn't increasingly swamped by lazy parasites whose questions are always just "I want..."? ;)
No :)
 
 
2 hours later…
6:25 AM
@DavidZemens at risk of sounding stupid - what's a "Dox"?
@brettdj I even considered starting a new one but I know it would end up the same way...
 
7:04 AM
There is some law of long run reversion when it comes to the forums, the user base and questions.
 
 
3 hours later…
9:48 AM
Thoughts on using `[A1]` in [tag:excel-vba] when working on the active sheet instead of `Range("A1")`?

I know the square brackets are short-hand for the evaluate method, but is there any downside to using this over the range method?
okay, so not all markdown works in chat!
 
 
3 hours later…
12:43 PM
I remember reading some years back that Microsoft had said "tunneling"was slower than using range - perhaps a good question? :)
found it
 
1:27 PM
No need for the question then! Good to know, tbf I tend to use it more for replicating formulas without using the WorksheetFunction object but wasn't sure what the overhead implications were.
 
 
7 hours later…
8:14 PM
I have a question:
I'm having a hard time understanding the mechanics behind using Application.Count(Application.Match(SavedArray(), Array("Lookup value"), 0)) as a replacement for Application.Countif for arrays as seen here and here:
0
Q: VBA Why does Application.Countif return an array or error 424

KerryI would like to count the number of matching items in an array. I tried using Application.Countif MyCount = Application.WorksheetFunction.CountIf(Myrange, val) but this returns an array full of errors rather than a simple count. I have also tried using Application.WorksheetFunction.Countif bu...

(comment on the question)
(answer by pgc01)
In particular, I am confused because match is usually Match(lookup value, lookup array, 0), but in the above example they are seemingly reversed
I've experimented with it in Excel and verified that it works, but I'm not sure exactly how it's working. Also, match usually returns a row number? So how do you get a count from a row number?
 
@puzzlepiece87 wecome to the room! to be honest I'm a bit confused by your question altogether
are you asking why the arguments have been supplied in the wrong order?
 
8:32 PM
@MacroMan Thank you for making it!
@MacroMan I guess I have several questions layered into one "how does it work?". Let me try breaking them into steps:
Step 1: Exactly what you said, what is the purpose of them using Application.Match(lookup array, lookup value, 0) in the way that they did, which is the opposite of the usual Match(lookup val, lookup arr, 0)? What does that accomplish?
When I do Application.Match(SavedArray(),Array("lookup value"), 0), it gives me Error 13 Type Mismatch
 
user4039065
You want to know why match(a1:a4, B1, 0) seems backwards. It is because it is array processed so that it is {match(a1, B1, 0),match(a2, B1, 0),match(a3, B1, 0),match(a4, B1, 0)).
Each will either return a number or an error. the count function counts numbers, not errors so you get a count of the OR criteria of whether any of the values in A1:A4 match B1 (exactly).
 
So I am really confused also how wrapping that all in Application.Count() not only avoids errors but gives the correct answer
Oh wow
Thank you
Now I totally understand. Let me look at the msdn Match documentation one more time to try to figure out how you knew that. I was just looking at it and didn't see anything similar to the pattern you just described, but that's obviously what's happening.
That seems to be an undocumented but cool feature.
Thanks @Jeeped! If I put a question up, would you answer so I can mark it?
 
user4039065
Sometimes nothing works until you flip the orientation of one of the arrays so that array processing is in different directions. match(transpose(a1:a4), b1:b9, 0) works when match(a1:a4, b1:b9, 0) doesn't.
 
@Jeeped Yeah, I was totally about to say that - just beat me to it.... honest.... haha
 
@Jeeped Would this do 40 comparisons then?
 
user4039065
8:44 PM
I would want to proof concrete examples; I'm talking off the top of my head (or outa' the other end) right now. Formula ► Evaluate helps with these.
 
36, excuse me
Each of A1,2,3,4 against B1,2,3,4,5,6,7,8,9?
 
user4039065
re: undocumented.. MSFT is lax on official documentation of array formulas beyond the basics because tehy don't want idiots hooping their worksheets for days with volatile functions in full column arrays.,
 
user4039065
No a1, a2, a3 and a4 somewhere within B1:B9. The range that is normally a range is processed like any other match function, the a1:a4 is processed as 4 individual calls.
 
Ah okay
@Jeeped Are you saying that you don't particularly want me to put a question up, or that if I do you may or may not have time to post your answer? If the latter, I can draft your answer for you and you can post it.
You already did most of the work so it seems only fair to me
 
user4039065
8:48 PM
Why not craft a question and self-answer it? If I can offer pointers, I'll be happy to.
 
I could do that too, but you came up with the answer :)
How are you ever going to catch Skeets if I don't give you credit?
 
user4039065
no worries, just run with it. Get a handle on a good canoical question.
 
Okay, will do
 
user4039065
I've vying for 2nd place right now. Don't think I have a shot aty first for years to come.
 
user4039065
btw, here's a breakdown on using an array in COUNTIF where you would normally expect a single value.
 
user4039065
9:05 PM
@puzzlepiece87 - Besides, I'm in a particularly good mood at the moment. I finally figured out what the (thinly disguised) guitar riff was from when Penguin & Butch blew up Azrael.
 
9:22 PM
@Jeeped You should share with the world in chat, you never know what lonely internet crusader may need the information.
(How is Gotham these days?)
 
user4039065
@puzzlepiece87 <spoilers>
After both Alfred and Jim couldn't shoot Azrael dead and Bruce couldn't kill him by running him down with a car, Penguin and Butch showed up with a rocket launcher. In the background, there was a thinly disguised opening riff from Bachman Turner Overdrive's Fragile (from Not Fragile, circa 1974). Just as the riff broke into a louder volume, Butch blows Azrael into little bitty pieces. Penguin turns to Bruce, Alfred and Jim and says "You're welcome." then turns and walks away.
 
That referenced guitar riff was for you then.
(Though I was more asking how you like the show these days, not the events within the show)
 
user4039065
9:46 PM
I am still replaying that scene at the end of the driveway and still laughing my ass off. Season 2 is much better than season 1 although I truly appreciated 'Jerome's) (can't remember the actor) shout out to Nicholson's gun dance on the court house steps.
 
10:13 PM
That's good to hear :) I'm glad it's improved so much.
Finally done with my canonical:
0
Q: Array CountIf Substitute - Count(Match())

puzzlepiece87Core Question How can I perform repeated CountIf()s on a range as efficiently (performance-wise) as possible? Concerns in Detail Range to Array Since each read/write to a spreadsheet results in slower VBA code, it is advisable to do so as few times as possible. Normally, if someone is repea...

Thanks again @MacroMan for making this room!
 
I only created it, everyone else made it
yeah, I just said that (cringe)
 
user4039065
btw, this may be too late but I did some speed testing on match vs countif a while back.
http://stackoverflow.com/questions/29972016/is-there-a-faster-countif/29983885#29983885
 
10:30 PM
Oh nice!
That's good work :)
 

« first day    last day (818 days later) »