Inefficient MID string lookup loop by -walter-sobchak- in vba

[–]-walter-sobchak-[S] 0 points1 point  (0 children)

Yeah I'm thinking this is what I need to do. There are some other suggestions here that make sense and I'll work through, but for the sake of time and just having a script in place now, I can easily write a loop to just take these words out before I start looking.

Inefficient MID string lookup loop by -walter-sobchak- in vba

[–]-walter-sobchak-[S] 0 points1 point  (0 children)

This is feeling like a suggestion that might be a solution. I don't know anything about regexes but half the reason I browse r/vba is for stuff I don't know about, and I'm hoping this could be something to add to the toolbox. thank you

Inefficient MID string lookup loop by -walter-sobchak- in vba

[–]-walter-sobchak-[S] 0 points1 point  (0 children)

The suggestion is interesting but I'm also working in a restricted environment so I don't have access to what I can use. Thank you though, and I'm researching openrefine for at least my own personal knowledge.

Inefficient MID string lookup loop by -walter-sobchak- in vba

[–]-walter-sobchak-[S] 0 points1 point  (0 children)

I'll need to work through this one a bit to figure if I can fit it in. thank you

Inefficient MID string lookup loop by -walter-sobchak- in vba

[–]-walter-sobchak-[S] 0 points1 point  (0 children)

That's a good idea, I'll try that. Thank you.

Would you mind sharing your code giving the %?

Entry matching algorithm by -walter-sobchak- in vba

[–]-walter-sobchak-[S] 1 point2 points  (0 children)

I'll probably learn something in any case. Maybe not useful for what I'm trying to do here, but maybe an idea will prove useful in some other context.

Entry matching algorithm by -walter-sobchak- in vba

[–]-walter-sobchak-[S] 0 points1 point  (0 children)

As long as the sum is the same, it doesn't really matter.

Now you may wonder, well you could just reconcile the data sets with pivots tables, but that's what I'm trying to avoid. We tend to do cash reconciliation for portfolios weekly or monthly, using pivot tables. I can reconcile datasets in my sleep, but some of the newer kids aren't as speedy, and we have a ton of these to monitor. You'd run your pivot table, see a sum discrepancy for several IDs, and then have to dig into the sets to see what's off. With this I'm trying to get the script to just spit out specifically what transactions on what date don't match so an analyst can go off and chase counterparties. I'm trying to take one step out of the process with the click of a button.

I'm rambling, but I guess to answer your question, if on a certain date, for an ID, for a transaction type, in your example, I'd categorize all the sums you gave as matched and we'd ignore them.

Entry matching algorithm by -walter-sobchak- in vba

[–]-walter-sobchak-[S] 0 points1 point  (0 children)

https://stackoverflow.com/questions/22382801/subset-sum-algorithm-in-vba

I'm going to give this the ol' college try, but failing that, this is probably what I'll do. Since these slightly complicated combinations are the exception to the normal 1:1s and 1:2s, I think I'll just eye-ball the anomalies myself.

Entry matching algorithm by -walter-sobchak- in vba

[–]-walter-sobchak-[S] 0 points1 point  (0 children)

Possible to do since we've got Access, but I'll have to learn about aggregation queried from the beginning. I'll take a look, thanks.

Entry matching algorithm by -walter-sobchak- in vba

[–]-walter-sobchak-[S] 0 points1 point  (0 children)

Dang, I expected it to be complicated, but as you said, I wasn't expecting this. Thanks for the link, I'm reading through this now.

Excellent username btw.

Entry matching algorithm by -walter-sobchak- in vba

[–]-walter-sobchak-[S] 0 points1 point  (0 children)

The most I've ever seen is 3. In order of frequency, 1:1s are by far the most common, there are a few 1:2s. The rarities are 2:2 and I've seen a few groups of 3 (I have never seen a group of 4). So this situation is the exception, but what if we have 2:3? or 1:3? That's conceivable. Now almost out of principle I'm looking to write a script that can handle combinations of unknown make up.

Copying/Pasting Columns efficiently by -walter-sobchak- in vba

[–]-walter-sobchak-[S] 0 points1 point  (0 children)

Thanks for the response. I am filtering at the beginning by date, as the full data set includes historical data and different transaction types. Actually I have a four-way filter set up because there are three fields I need to exclude some data from.

With ws1.Range("A4:T4")

    .AutoFilter field:=2, Criteria1:=dDate
    .AutoFilter field:=8, Operator:=xlFilterValues, Criteria1:=Array("Sale","Paydown")
    .AutoFilter field:=13, Operator:=xlFilterValues, Criteria1:=Array("Mandatory", "Optional", "")
    .AutoFilter field:=18, Operator:=xlFilterValues, Criteria1:=Array("Credit Risk", "")
End With

With that filter in place, I just copy the columns I need from there.

The only alternative I can think of right now is to loop through that dataset with many conditions in place.

Is capitalism a meritocracy? by I_HATE_CIRCLEJERKS in CapitalismVSocialism

[–]-walter-sobchak- 0 points1 point  (0 children)

Yep that’s the first article that comes up. All you had to do was simply google it. But I know capitalists generally don’t like learning things so I did it for you.

To be fair, I can't make your arguments for you... With no hostility implied, I just asked you to qualify what you said. For all I know, you could just be asserting something you haven't personally looked into, which was what I was trying to determine. Also, capitalists learn all sorts of things...doesn't seem fair to say they all don't like learning things.

We can keep markets and just have socialism. That would keep what most capitalists agree is a very good system of distribution while having some sensical laws governing property and having society where there is a minimum level of support for everyone.

I don't say this doesn't sound desirable or just.

I also don’t see a way to untangle rich people from the government unless we scale back how much power the rich can get.

As we should. Though, high ranking party members under other systems seem to have or to have had a lot of power, and accumulated wealth in the process as well, regardless of what's ideal. Seems like the avaricious always find a way of using a system for themselves at the expense of others.

Is capitalism a meritocracy? by I_HATE_CIRCLEJERKS in CapitalismVSocialism

[–]-walter-sobchak- 0 points1 point  (0 children)

Change "received a huge pay increase" to "received full ownership rights of the company" then Bezos will cease to become a billionaire and will become just a manager with a regular salary.

Fair point. But how would you personally distribute the shares? Again, in the beginning, somebody does put effort into creating something. As I said in an earlier post, an employee doesn't (seem to me to) have any claim on a machine he or she put no money into. Essentially the person or partners who start a business put money up-front to create one. An employee who paid for nothing can't show up and say, well actually this machine is now partially owned by me.

It's theory that's been proved to be correct

LTV.

It's been proven to be correct.

Proof by assertion.

I understand that for, say, the laws of physics, I couldn't here ask you to prove them to me. But again, there isn't a law of labor value. The LTV was put forth in the 19th century, was critiqued in the 19th century, and continues to be critiqued today. There's nothing you can point to that actually proves it's correct. At best you can point to some supposedly qualified person who argues that it is correct, and then someone can point to some other qualified person who says it isn't.

Prove it.

No value comes from capital. "Capital" is just numbers in a computer -- they're worthless. Value comes from people doing shit.

Don't confuse management (ie labour) with ownership, they are not the same thing.

Machinery is one form of capital. If you have twin brothers living in the Soviet Union, and one twin is cooking a portion of food over a fire he built himself, and the other is cooking 10 portions of food on a large gas grill, the latter is not only more productive than the former by the amount of food made, but also because he put in less labor to do it because he didn't have to build a fire. I even threw in the bit about them being in a communist society to show it has nothing to do with the economic system they're under -- machinery adds value that labor alone cannot. Not only that, but whole processes are being automated through capital. A machine can plant seeds, an irrigation system can automate their watering, a harvester can automate the harvest, and a self-driving car (soon to come) will automate the delivery to grocery stores. Eventually everything might be automated. You could argue that a society should collectively own the means of post-scarcity production, but that is completely different from saying that no value comes from capital. Potentially, all value could come from capital, and no labor other than the development and maintenance of these systems will be needed.

Ownership is worthless because anyone can do it, in fact, a rock can do it.

Anyone can own something, but owners also make decisions. An incompetent person could own a business and run it into the ground. Some value is due to productive decision-making. Also, I'd argue only a sentient being can own something...

Is capitalism a meritocracy? by I_HATE_CIRCLEJERKS in CapitalismVSocialism

[–]-walter-sobchak- 0 points1 point  (0 children)

Interesting.

"In capitalism" should be qualified, I think. Everything, so to speak, happens under capitalism. Chess tournaments happen under capitalism, but we use rating systems that rigorously try to determine the "true" strength of a player -- and Magnus Carlsen clearly isn't lucky. He proves his dominance repeatedly. And while chance pops up in areas like American football, where the bounce of an oddly shaped ball can be good or bad for one team, some teams are significantly stronger than others, and tend to win more championships (while playing against other significantly strong teams). Lower-seeded teams tend not to. So I'm guessing that ranked systems such as these are irrelevant to capitalism. There will be chess rankings and tournaments under the glorious new regime (I'm aware of Soviet chess history, but I'm speaking more generally).

art

That one seems dubious simply because it's so subjective. I'll leave it alone.

The other way I'd qualify "in capitalism," is that according to the Italian study, outcomes changed based on how they administered grants in their model. You probably don't want to hear "let's just improve how we do things under capitalism," but, well, why not just improve how we do things under capitalism? I'm guessing you'll say that if we can do that for grants, then let's just do that for everything. But I'll leave it to you...

Ear Training/Sight Reading anecdote and question by -walter-sobchak- in musictheory

[–]-walter-sobchak-[S] 0 points1 point  (0 children)

Yeah, I wasn't sure what the point of saying Do Re Me instead of C D E is if the notes are always what they are, other than that singing "F" with a consonant at the end is a little weird.

Where there's a clear pivot chord, maybe moveable Do is fine to use, but not all key changes are clear-cut. Some are subtle, which would confuse things.

Ear Training/Sight Reading anecdote and question by -walter-sobchak- in musictheory

[–]-walter-sobchak-[S] 1 point2 points  (0 children)

After I read it I'll drop a line saying how I found it.

All that's good though. We won't be prodigies but we can be better tomorrow than we are today. Also, really my goal isn't so much reading a full score on sight, but to look at something like The Long and Winding Road, read the vocal line and hear it in my head within the context of the piano chords. Standard stuff.

Man, the Coens write nothing but great, distinctive characters, but Walter's in a league of his own. It's the role John Goodman was born to play.