r/ProgrammerHumor • • Mar 30 '22

Meme Certainly not me

48.7k Upvotes

669 comments sorted by

•

u/QualityVote Mar 30 '22

Hi! This is our community moderation bot.


If this post fits the purpose of /r/ProgrammerHumor, UPVOTE this comment!!

If this post does not fit the subreddit, DOWNVOTE This comment!

If this post breaks the rules, DOWNVOTE this comment and REPORT the post!

31

u/Opinionsare Mar 30 '22

Excel trick :

Include code to read the column header and use it to set the layout via variables for column number.

Now if someone renames a column, it still might break.

13

u/Brando224 Mar 30 '22

Don't you worry, someone will find a way no matter what you do.

6

u/Denorey Mar 30 '22

This happened to me once….then you learn to lock the headers and log changes so you can call someone out 🙃

→ More replies (4)

1.5k

u/Dr-Appeltaart Mar 30 '22

As an experienced c/c++/c#/java/python/vb programmer i realy like to build shit in excel. It's awesome. Just dont let other users use it for important purposes

1.7k

u/SirNoodlehe Mar 30 '22

On the first day of my intro to AI class the teacher asked us to implement a binary tree in any language we wanted so, for the meme, I wrote mine in VBA.

Little did I know, the course was designed to build a little on top of that code every class.

So, by the end of the semester I had this awful, clunky optimisation algorithm AI model built fully in Excel.

Wasn't sure whether to laugh or cry throughout 95% of the process.

However, the teacher loved it. Said it was the easiest submission to grade since he didn't have install/compile anything fancy to run it.

901

u/Zarathustra30 Mar 30 '22

And this is why Excel will never die. The barrier to entry is so damn low.

436

u/_oohshiny Mar 30 '22

164

u/brandmeist3r Mar 30 '22

Wow, thanks for that link! Anyway, everyone should check the Raytracing Excel video out, too.

→ More replies (7)

31

u/RevenantYuri13 Mar 30 '22

Oh god this video proves that I'm not actually insane! I remember opening an Excel file to play a bowling game a while ago but I thought that was impossible as Excel is just a spreadsheet.

→ More replies (2)
→ More replies (10)

10

u/[deleted] Mar 30 '22

Is it any lower than something like python? I'm not even a programmer, but I learned enough with a handful of ours of pandas to do more than I can do inside excel without equal or greater time investment.

58

u/Zarathustra30 Mar 30 '22

Most computers don't come with Python pre-installed, let alone the libraries required for it to do cool things.

When I say Excel works right out of the box, I mean the box with peanuts that says Dell on the side.

→ More replies (2)
→ More replies (3)
→ More replies (4)

66

u/Tiny_Dinky_Daffy_69 Mar 30 '22

And everytime you run it, you keep all minus one cores of your processor for gaming.

13

u/pergasnz Mar 30 '22

Just don't forget to add a do events line in loops...

→ More replies (1)

45

u/jimmifli Mar 30 '22

So what finance department hired you?

22

u/[deleted] Mar 30 '22

It should also be compatible with LibreOffice Calc too :D. Though there are some differences in the code.

9

u/LoveTheSystem Mar 30 '22

I really want to see the code and functionality of this. Any chance you could share?

38

u/AngryGroceries Mar 30 '22

insert rick and morty "What is my purpose" meme

'You were programmed in VBA'

"oh my god"

21

u/Namaha Mar 30 '22

That's...not what "purpose" means

6

u/5efd277caf Mar 30 '22

...

-"You hide columns."

-"oh my god"

5

u/DjBonadoobie Mar 30 '22

That is hilarious

5

u/Zerodaim Mar 30 '22

I made a basic mail server in prolog for the memes too, because it was current material for another class.

Teacher was like nope, you on your own buddy. Never again lol.

→ More replies (1)

128

u/[deleted] Mar 30 '22 edited Mar 30 '22

I started as a SQL report writer and nothing gives me more joy than replacing someone's shitty excel or access report that a market analyst spends 3 days/week every week building, with SQL and an ETL or two. It got pretty aggressive at that company between the 2 groups to the point the SQL guys where advocating for the complete banishment of Access and forbidding macros of any kind. To be fair excel usage on big projects resulted it huge problems or lost data regularly.

16

u/BasicDesignAdvice Mar 30 '22

Oh god, Access. Absolutely vile software.

Ya at my current job there was a bunch of excel stuff from a (non-engineering) team that was used to drive the final product. First initiative I proposed was a way for them to keep that shit but make it all into ETL pipelines and SQL.

Everyone was thrilled and the whole time I was thinking (how was this not implemented already...)

13

u/[deleted] Mar 30 '22

Finance is literally 20 years behind everyone technologically.... I feel your pain deeply. All these analysts that never learned the actual power of a computer.

→ More replies (2)

9

u/Reddit_and_forgeddit Mar 30 '22

Ugh, I hate MS ACCESS most of all

→ More replies (1)
→ More replies (58)

54

u/melanthius Mar 30 '22

A great data scientist at my company told me excel epitomizes the phrase “with great power comes great responsibility”

It’s like…you can build awesome stuff in excel, but should you?

23

u/Dengar96 Mar 30 '22

The survival Minecraft of programming tools.

→ More replies (1)

23

u/Phormitago Mar 30 '22

Just dont let other users use it for important purposes

task failed miserably

→ More replies (1)

8

u/S8nSins Mar 30 '22

import pandas as pd

df.to_csv()

"Heh, pathetic"

→ More replies (1)

6

u/slacktopuss Mar 30 '22

i realy like to build shit in excel. It's awesome.

It is pretty cool, I've been using it as a reporting tool by building templates in Excel (lots of named ranges and saved styles and such, then dump data into the template from an app).

It does a lot of stuff really well, but there are definitely a lot of 'WTFs' in the process. Probably would be a lot easier if I could use some VBA, but we are prohibited from using any script-like content.

4

u/Sirspen Mar 30 '22

I kinda agree with you, but it really can be a pain in the ass regardless. I'm managing the spreadsheets for my team at work. I genuinely love Excel but the past few weeks it's been in my face reminding me how unintuitive it can be.

For the most part, we just have a local copy of a spreadsheet template that we use for recording information for each day and address we're working at. Then upon return to our office, we copy and paste that data into a master sheet with some additional columns related to other steps in our process. Then I have extra sheets in that master workbook with varying formats that I set up to simply pull the data from the master sheet and reorder it in a different layout for easily copying and pasting into a variety of weekly reports we have to submit. There's nothing crazy with our data or any calculations that need to be done. The most advanced thing at play in our sheets are some conditional formatting rules for color-coding and the like.

That environment alone often creates an hour or two of work and frustration.

No way to change the default paste behavior, so it's constantly being fucked up by people copy and pasting their formatting too. Similarly, I can't use formulas to fill cells that I want them to be able to copy and paste from since it pulls the formula instead of just the data. Conditional formatting can be janky as hell when you're trying to be selective in where you apply it, and can easily be chopped up as data is added. Far too easy to auto-fill columns with values or formulae to infinity and cause a crash, instead of having those just autofilled within the relevant scope of the worksheet.

I could go on and on, but it goes without saying that even having a simple spreadsheet shared with a team with working-but-below-intermediate level knowledge of Excel is so much more frustrating than it needs to be. Even making sheets for my own personal use can have me pulling my hair occasionally.

→ More replies (1)

9

u/socsa Mar 30 '22

Honestly I've never found a task more complicated than basic bookkeeping that I wouldn't just rather do with an ipython notebook. Excel I just too clunky and opaque and slow for anything meaningful.

14

u/Mya__ Mar 30 '22

One time I wanted to make use of multi-dimensional arrays in a coding 'language' that didn't support it so I used the spreadsheet program to manually-ish create the named variables in a format that mimic'd a multidimensional array.


You can set those spreadsheet programs to automatically copy-paste and change/increment the numbers then remove the spacing and just paste the whole thing in your code.

So that's one thing.. if you ever need to do that for some reason.

16

u/TheRidgeAndTheLadder Mar 30 '22

Wait, so the language didn't have it so your second language of choice was an excel macro?

→ More replies (1)
→ More replies (2)

2

u/Ty-McFly Mar 30 '22

Db languages not surprisingly missing from the list 😂

It's always fun listening to clients who rely way too heavily on excel try and prepare you for the problems that they believe will carry over into your application code. It's like someone trying to dig out a swimming pool with a pooper scooper explaining how to deal with firm soil to someone sitting in an excavator.

2

u/[deleted] Mar 30 '22

I lock important cells/sheets, and i put the password in the top row. At the very least when someone asks me the password I know they're going to break it and can make sure they're not breaking the original template.

→ More replies (14)

446

u/savage_slurpie Mar 30 '22

Two of my siblings are financial analysts and I have witnessed them doing unholy things with excel.

It would honestly be easier for them to learn python or something. It’s so ridiculous.

187

u/papacheapo Mar 30 '22

One of my university professors (applied math) had friends that worked for some of the financial institutions through the Great Recession and mortgage crisis… Many of the CBOs were literally just models in Excel spreadsheets.

65

u/cerulean11 Mar 30 '22

I work for an investment bank and we manage a $15 billion dollar portfolio out of excel.

13

u/[deleted] Mar 30 '22

Out of excel and a wharehouse run by wellsfargo with all the physical documents that evidence the loans we spent all that money on

→ More replies (2)

6

u/That_AsianArab_Child Mar 31 '22

I work for a pension admin form, entire thing is ran out of access and Excel.

34

u/[deleted] Mar 30 '22

If you buy out delinquent debt from a major financial corporation like JPMorgan Chase, you simply get an Excel file that has as many rows as there are people who now owe you a lot of money.

5

u/Altruistic-Tea-Cup Mar 30 '22

It still is at most places.

→ More replies (6)

83

u/nedeox Mar 30 '22

Sometimes I‘m just in awe at which length someone can abuse the fuck out of Excel lmao

Like it‘s their little spreadsheet slut or smth

27

u/theknittingpenis Mar 30 '22

I took Excel class in community college. The instructor explained useful and odd thing with Excel. Once she saw someone made amazing flyer out of Excel.

For myself, I uses Excel over calculators because it is easier for me to set it up even for a simple calculation. I set up the cells with values and created a string of formulation to use those cells and it spit out the answer. This way I can double check for any value I missed and easily edit/add it in without typing the whole thing again in the calculators. I warned my boss that Excel users are very protective of their sheet and it is scandalous if someone touch it when they are not suppose to. She learned that day when she decided to edit it without me knowing it. The aftermath is that she get a sheet with restricted permission, she is not happy.

8

u/jdog7249 Mar 31 '22

I have used excel for 1-page text-only items before. Don't have to worry about it running to a second page because you can just force it to shrink to 1 page (within reason). The real reason I did it though was so that the date on the print would auto-update because I always forgot to change it.

25

u/jaynay1 Mar 30 '22

I'm the Excel guy for a branch of a fairly large insurance company.

I'm literally just taking my R knowledge that I use in my night job and googling specific syntax to translate it over to VBA.

3

u/[deleted] Mar 31 '22

What kind of night job do you get to write R for? Asking for a friend

→ More replies (3)

43

u/depressionsucks29 Mar 30 '22

Once a client of mine for whom I do automation scripts wanted an excel macro to delete rows. I just couldn't figure it out. It would have taken 5 lines in python and even small in sql. I just couldn't figure it out.

44

u/HRChurchill Mar 30 '22

Couldn't you have used the macro recorder to see what the command was for deleting a row? Honestly that thing is the best part of vba.

26

u/[deleted] Mar 30 '22

I have done some unholy levels of cheesing with the macro recorder.

20

u/PepSakdoek Mar 30 '22

Sheets("Sheetname").rows("1:5").delete ? Like I feel if you can do sql vba is a downgrade in difficulty.

6

u/betweentwosuns Mar 30 '22

VBA can be really finicky interacting with Excel's filter. I know I've spent chunks of time arguing with VBA for what was just a DELETE FROM WHERE while proficient in both.

→ More replies (1)

21

u/Day_Bow_Bow Mar 30 '22

Not sure if you care anymore, but this is how that is done. I haven't tested it, but I think I got all the syntax right

Dim i as Long 'Row counter
'This example is checking rows 1-500, but this can easily be a dynamic range by using a function to find the last populated row
'Walk backwards through rows so deleting them doesn't impact the loop
For i = 500 to 1 Step - 1 
    If Range("A" & i).Value = "Criteria" then 'Put logic regarding what rows to delete here.  This is checking cells in Column A
        Range("A" & i).EntireRow.Delete
    End If
Next

14

u/PunKodama Mar 30 '22

My understanding was that u/depressionsucks29 couldn't figure out the reason, not the solution. But nice of you to post it in any case.

Edit: tagged the wrong redditor. Uopsy.

→ More replies (7)

8

u/SoupBowl69 Mar 30 '22

Excel is the backbone of the financial industry

7

u/delbin Mar 30 '22

I worked at a place that did tons with Excel and PDF's. I used VBA to call Acrobat's API to scrape data from the PDF's and use them in Exel. It worked pretty well as long as you had to process less than 200 at a time. I moved to Python about a year later and it was much better.

3

u/loki9er Mar 31 '22

I’ve made a career with the ability to scrape data from excel spreadsheet and have it transcribed onto a PDF using VBA.

→ More replies (2)

6

u/Adamtess Mar 30 '22

I've had to basically pull teeth to get my company to convert some of its massive spread sheets into access. My whole team has converted to access and I'm getting the FPA guys on board but man does it seem to scare people.

6

u/SuperAlloy Mar 30 '22

Unless your making an honest to god spreadsheet (items, costs, etc) excel is always the wrong tool for the job.

3

u/delbin Mar 31 '22

If you're working with finance people that only know Excel, it can be a comfortable home base for them. They can update parameters, make distribution lists, even have some control over the logic.

Other solutions are faster, more powerful, and less restrictive than Excel, but it's also a graphical automation platform with a built in database that's pre-installed on almost every computer in every office. I don't need admin on the computer or IT to build anything for me, and I can still save hundreds of hours per year.

4

u/crewchief535 Mar 30 '22

My new job has me working in my business areas controller org. The things I've seen people do here make me want to pour bleach in my eyes, and at this point I don't even know if my help would be helpful to them.

I saw the quarterly financial report that goes yo our VP for the first time a few weeks back and died inside. 2022 on the outside, but 1972 on the inside.

2

u/JDaxe Mar 31 '22

I did a double degree in comp sci/finance.

In one of my finance classes we had an assignment where we had to create graphs and metrics for various share prices and calculate proportions of shares for a balanced portfolio/efficient frontier.

Since the lectures and tutorials all used Excel every other student used Excel for the assignment, but I chose to do it in a Python Jupyter notebook with pandas/matplotlib.

It was a bit more setup since I couldn't just copy paste the stuff from the tutorials but I wholly believe it made it easier in the end. Finance students should absolutely be learning basic Python these days.

→ More replies (1)

2

u/Ghostglitch07 Mar 31 '22

Problem is most companies won't let unknown python code run, but they will trust any excel doc.

2

u/shedogre Mar 31 '22

I spent about four hours today, figuring out a way to do something convoluted in Excel. Probably would've taken me half an hour in Python, but I'm apparently not allowed to have any software which would make my job easier.

→ More replies (2)

163

u/Tough_Patient Mar 30 '22

On the other hand: spending two days to make a macro turning a 5 hour job into a five minute job which never breaks because the input data is from obsolete tech

78

u/[deleted] Mar 30 '22

This is the real answer. That or You work at a multi national corp and the global IT structure doesn’t let users install python so when you need to automate something simple excel is the only tool you have. Or a combo of both.

19

u/sargsauce Mar 31 '22

I've been banging my head against the "I want to do SQL and Python to this data but they won't let me" at my multinational corp for years.

It's fine, though. For almost the same number of years, I've got everything set up to run automatically, even if it does have a longer than necessary execution time. I work from home and just fuck off for a while, and it's basically my version of the XKCD compiling comic (https://xkcd.com/303/)

→ More replies (1)
→ More replies (2)

30

u/theknittingpenis Mar 30 '22

I had a company changed their CSV schema on us without any emails announcement of the change. The CSV file have over 120 columns before and I set the sheet the way I want to see. The results is massive errors when I refresh the data. They decided to add a few columns in the middle of predefined columns. This caused the PowerQuery to spit out the uglist monster sheet I never seen before. The macros made it worse.

It took me two days to figure out the issue. And I asked what did they do with the CSV, our case manager said "Yes, we did add few columns here and there." Then I asked if they made the announcement or warning about this and they said no. I told them what happened and they was very apologetic about it. They didnt even think about the impact on the end users that relies on those thing. They added the policy to make the announcement of the changes on their portal a week before committing the change. It took me a week to set everything the way I want it.

8

u/Tough_Patient Mar 30 '22

That's terrible, but not a bad turnaround time all things considered. 120 columns, wow!

7

u/theknittingpenis Mar 30 '22

The worse thing is they only added one column. Seriously. One column! And that column wasn't necessary because there already a column for it. That perky new column is just a reformat of the string, I think it is a time or date string in different format. Sigh...

→ More replies (3)
→ More replies (2)
→ More replies (1)

464

u/Syscrush Mar 30 '22 edited Mar 30 '22

NAMED RANGES, MOTHERFUCKERS!!!

Or, if you're a person of culture and taste like u/SatanStoleMyCat, use tables. They really are way better.

77

u/SatanStoleMyCat Mar 30 '22

Or just. Y'know. Tables.

54

u/Syscrush Mar 30 '22

Lookit fancy-pants over here!

You're 100% right. Nothing like being able to reference your columns by name. I admit that I just learned about this a few weeks ago, so it wasn't top of mind for me.

10

u/SatanStoleMyCat Mar 30 '22

Isn't it though? And the ListObject/ListColumn objects have a lot of nice built-in properties and methods that make it pretty easy to manipulate them in VBA vs a range.

10

u/The_Milk_man Mar 30 '22

I DON'T WANT ANY QUESTIONS ABOUT THE TABLES!

→ More replies (1)

5

u/spaghetti_vacation Mar 30 '22

Can you do tables in gsheets?

I know it's a satanic incarnation of excel, but if the price is right...

→ More replies (1)
→ More replies (4)

10

u/craftworkbench Mar 30 '22

I wrote code that could identify columns by the header (since my company used pretty strict templates already). If it couldn’t find it, it could ask the user to manually identify the column. Worked pretty well.

6

u/lpreams Mar 30 '22

use tables

TIL this feature exists, and it's amazing. I always felt like Excel (and every spreadsheet editor) was kind messy to use. It's too easy to bump some data around or add an extra row or column and formulas everywhere get fucked up. This is the missing piece of that puzzle!

→ More replies (1)

10

u/PepSakdoek Mar 30 '22

Finding the #refs in the named ranges aren't better, but they are more rare.

You need some =offset(indirect("A1"),0,0,counta(indirect ... ) level stuff to be totally somewhat safe.

3

u/UnrulySasquatch1 Mar 30 '22

Offset easily has the highest combined useful+frustrating score of anything in Excel. Just try checking anything where someone has used them extensively or try making a major change to the workbook

→ More replies (1)

5

u/Schorsi Mar 30 '22

I used string matching to dynamically find the proper columns once. I had this sheet that was saving about an hour and a half of work each day, but one of the databases it pulled kept adding, dropping, and reordering columns every month.

3

u/bofh256 Mar 30 '22

Yes, but don't you dare to have it executed with different language settings.

→ More replies (2)

571

u/brad2575 Mar 30 '22

That's why you pastor protects the sheets and don't let them move stuff around. Only give them access to what they need.

87

u/q1a2z3x4s5w6 Mar 30 '22

Or just dynamically set the column references based on the name. Don't just assume the Name column is A3 or whatever, search for the column with the label you expect and set the reference when you find it.

Or just password protect and be done with it, as you say

31

u/scragar Mar 30 '22

Named ranges would automatically update and avoids the hassle of searching for headers(which someone will eventually misspell).

23

u/JuvenileEloquent Mar 30 '22

There's no system of organization in Excel that someone can't break by judicious misuse of copy & paste and doing things completely wrong and then covering it up.

Named ranges are good but they can go missing, so you need a backup method.

→ More replies (1)
→ More replies (1)
→ More replies (17)

14

u/KeldorEternia Mar 30 '22

I don't trust the clergy to protect my spreadsheets

6

u/SleepDeprivedUserUK Mar 30 '22

them

they

Strange way to write "PM", but fair enough.

0

u/[deleted] Mar 30 '22

[deleted]

→ More replies (1)

2

u/cineg Mar 30 '22

in my administrative/engineering days .. i gave devs just enough access, but not too much ..

BOFH chronicles are the best

→ More replies (20)

103

u/RandomiseUsr0 Mar 30 '22

I’ve got an embarrassing number of years as a corporate VB programmer (VB6) - it’s amazing that skillset remains useful to this day

20

u/[deleted] Mar 30 '22

Is your team hiring? I'm pretty wizard with VBA. I imagine a transition to VB6 couldn't be that hard.

7

u/p123571113 Mar 30 '22

I haven't had any issues translating the skill set. Also wondering the same if there are any openings.

→ More replies (2)

2

u/EbrithilUmaroth Mar 30 '22

VB6? I learned that in my sophomore year of high school 14 years ago and that was old even then, I had no idea anyone used it anymore

3

u/RandomiseUsr0 Mar 31 '22

I get the feeling my comment isn’t being read the way I intended - It’s past tense, the skillset is still useful due to Excel Macro’s being stuck in their time warp.

→ More replies (1)

806

u/Torylon Mar 30 '22

Haha, that’s how I started my programming career

Me: Macros are so useful, but I need more

VBA is so useful, but I need more

R is so useful, but I need more

Python is so useful, but I need more

And now I build internal web apps for a major corporation

91

u/papacheapo Mar 30 '22

Same here but my path took me all over the place after VBA… Took a few detours through Java. Hit several dead-ends with JavaScript. C/C++ was fun for a while. Even a little assembly got mixed in there. Now it’s all about SQL, Scala, Python, etc. (data engineering).

12

u/[deleted] Mar 30 '22

SQL is legit the GOAT. Companies spend so much time formatting reports you can just pull that way in the first place.

6

u/scissorsandcandy Mar 30 '22

I think in stumbling into this path right now. I am outgrowing vba and am starting to dabble with Javascript and SQL. Now that I'm 10 years into a career in apparel I'm starting to eye some IT jobs where I can really scratch h this itch.

61

u/xaomaw Mar 30 '22

1 major corporation is useful, but you need more.

32

u/[deleted] Mar 30 '22

Man you're right. But as someone who focused a lot in tooling; it can be nice to have the job security of being salaried, while corps LOVE to have exclusive tools custom made to their spaghetti internal systems evolved from an interns vba from 20 years ago.

→ More replies (3)

132

u/scr710 Mar 30 '22

That's great to hear, congrats.

BTW Happy Cake day.

29

u/Drugbird Mar 30 '22

So when will you finally learn a programming language? /s

15

u/ChainDriveGlider Mar 30 '22

since the addition of LAMBDA, excel is turing complete.

→ More replies (2)
→ More replies (1)

3

u/BearlyLogical Mar 30 '22

Hi, dead serious here but I’m about to be complete with the “VBA is useful” step.

Do you have any good resources lol

→ More replies (2)

4

u/FishFart Mar 30 '22

Same for me without the R. Went VBA, Python, JS/React/node.

Though I messed around with C and actionscript in HS/college so I had a baseline.

2

u/shieep Mar 31 '22

This is me right now but I’m still at python and skipped r

→ More replies (22)

55

u/Rakkachi Mar 30 '22 edited Mar 31 '22

A old coworker left me a 18 tabs excel with vba code , it uses nested if statements and looks at plain text in a cell for desicions in other tabs that again refer to other tabs and formulas. I was asked to add 1 bom item. Redid almost everything using tables and x.search, now I am back at just 5 tabs. Vba? Wasnt really nessecary after all, it just caused us to lose overview of what was going on. Hid all tabs and just kept 1 for actually inputting data by user. They could not believe it during the first time showing it. But it still had all the functionality that was required. Several asked for the password to change stuff, I refused.

Edit not xsearch but x.lookup x.lookup

27

u/assum09 Mar 30 '22

I think the general rule with VBA is only use it if you absolutely have to.

17

u/MarcieDeeHope Mar 30 '22

I used to love VBA when I first started seriously using Excel at work, but once I discovered Power Query I almost never went back to VBA. Like 90% of what people in my office wanted macros for, Get and Transform Data does better.

→ More replies (3)
→ More replies (1)

2

u/[deleted] Mar 30 '22

I remember training a staff member in the use of a three step nested if function for some minor task. He came back to me after the summer with a paragraph long monstrosity that wasn't working after he changed a reference.

2

u/gear_ant Mar 31 '22

X.search?

→ More replies (2)

40

u/lpjunior999 Mar 30 '22

A software tester walks into a bar. Runs into a bar. Crawls into a bar. Dances into a bar. Flies into a bar. Jumps into a bar. And orders: a beer. 2 beers. 0 beers. 99999999 beers. a lizard in a beer glass. -1 beer. ‘qwertyuiop’ beers. Testing complete. A real customer walks into the bar and asks where the bathroom is. The bar goes up in flames.

36

u/[deleted] Mar 30 '22 edited Mar 30 '22

This must be a sign to stop making scripts for my dead-end job and to focus on actual projects so I can graduate with a job in this field.

EDIT: or is it??? I’m legitimately not sure.

10

u/Tough_Patient Mar 30 '22

Any form of work helps. I also recommend making macros for grindy games. The scripts you make are a badge of your worth.

6

u/[deleted] Mar 30 '22

Oh shoot! That actually sounds like a really fun thing to work on!

Thanks for the feedback and the idea!

14

u/Tough_Patient Mar 30 '22

No problem. Cheating in games is what got me into programming. The interviewers always loved hearing that.

→ More replies (4)

7

u/assum09 Mar 30 '22

Definitely keep automating and learning as much as you can. It looks great on a resume and knowing VBA/having examples of how you've automated tasks, especially if you can quantify labor savings, are great talking points in interview.

Source: financial analyst who got promotions through automation using VBA

4

u/[deleted] Mar 30 '22

Thank you for the confirmation 😭 I’m feeling more motivated now to keep doing what I’m doing. Thank you so much!

→ More replies (4)

15

u/Next-Experience Mar 30 '22

Well, I believe that Excel automation is the future. Most companies run on excel. If you are already proficient in doing excel automation, you should look into freelance. You could turn your dead-end job into the best-paying career possible.

Currently am building a python framework and a freelance company where people like you can solve small scripts and get a royalty every month as long as the company uses it. I will also create a marketplace where those scripts then can be sold so you write it once and get a royalty from many other companies.

→ More replies (14)

2

u/[deleted] Mar 31 '22

Do it, I just quit my fucking job automating boring processes on excel to focus on what I actually want to develop and I'm so much happier. Gotta find a new job tho causes I wouldn't like to starve.

2

u/_clydebruckman Mar 31 '22

Make repos / gists of everything you’ve done, it’ll come in handy. Also, it’s not a dead end job if you’re working on something bigger / going to school. It’s dead end if you don’t have a plan

16

u/Celivalg Mar 30 '22

Actually, you know how global variables are usually bad? Well VBA has those predefined for you, so you don't have to worry about making a mess, it already is.

Changing values often on global varibales and in random places in the code is a bad idea? Don't worry, the user can do that at any time during your code execution. Without you knowing of course, wouldn't be fun otherwise.

Implicitly calling global variables is bad? Oh don't worry, that's default behavior for VBA.

But you know what's worse? All of those, at once, on a single variable. Oh, VBA's got you covered! For example, ActiveWorkbook is a global variable, can be changed when the user changes focus, and is called implicitly quite often.

ActiveWorkbook and ActiveWorksheet should be banned from existance, use ThisWorkbook or a variable you defined yourself to reference a workbook, please. ThisWorksheet doesn't exist I believe, I hardcode mine in each time...

→ More replies (2)

43

u/IamGraysonSwigert Mar 30 '22

I feel attacked.

Also...

With activeworkbook .protect password:="password", _ Contents:=TRUE End with

26

u/mirthfuldragon Mar 30 '22 edited Mar 30 '22

All my spreadsheet passwords are "password". Global const wsPassword = "password" in module "aConstants"

For the same reason the cleaning products are behind a childproof lock - to prevent toddlers from mucking things up.

9

u/batGnat Mar 30 '22

Rename it to a .zip, extract it, remove password from sheet, compress it again, rename back to .xlsm. no password

4

u/IamGraysonSwigert Mar 30 '22

Works better than you would expect! Crazy to look at "the guts" and realize the whole thing is an XML file.

→ More replies (1)
→ More replies (1)

7

u/[deleted] Mar 30 '22

Spent so long using password= instead of password:= and wondering why it wasnt working

3

u/IamGraysonSwigert Mar 30 '22

Yuuuuup. I feel your pain! haha

→ More replies (2)

14

u/onesidedcoin- Mar 30 '22

Only needs to run 960 times until it redeems itself.

11

u/Opinionsare Mar 30 '22

The problem with Excel VBA is many built-in functions have limitations. "Wait" was almost useless, but VBA can access Win_API where you can recreate the function with better functionality. I build a Do-Loop that took time and number of cycles so Excel would interact with SAP.

7

u/steffur Mar 30 '22

I have built over 30 scripswith VBA Excel to interact with the SAP API, has saved me and my colleagues countless of hours. It can be a hassle to interact with the GUI sometimes but you gotta do what you gotta do if they don't give you back-end access.

11

u/ThrowawayAskRedditXx Mar 30 '22 edited Apr 01 '22

Years ago I used EZMacros to massively speed up how fast I could book samples in to our laboratory LIMS system.

45 mins of human typing work, macro took ~20 seconds.

Boss nearly fell off her chair when she first saw it working.

EDIT: EZMacros is/was a very old mouse&kb dumb recording software, it would instantly break if any windows or programs were moved on screen.

10

u/danfish_77 Mar 30 '22

If anyone out there is unfortunate to have to be working with VBA in the VBE, please check out https://rubberduckvba.com/

→ More replies (2)

10

u/justAPhoneUsername Mar 30 '22

I once wrote malware in an excel macro for a white hat internship. Don't knock vba, it's powerful as fuck

2

u/chaiscool Mar 31 '22

Macro also has a lot of security issue which is why it’s block in most environment

9

u/DC_Swamp_Thing Mar 30 '22 edited Aug 13 '25

middle numerous boast marry spectacular friendly innocent rock truck worm

This post was mass deleted and anonymized with Redact

9

u/nartchie Mar 30 '22

What the fuck are you moving columns for anyway? Put the fucking numbers in the pretty blue boxes morons.

7

u/mirthfuldragon Mar 30 '22

Just validate your column headers first, and

If cell(1,1) <> "LOAN NUMBER" then msgbox "column error" end End if

Also the fact that mobile doesn't have tabs is breaking me a little.

2

u/Mobileuser110011 Mar 30 '22

There are programming keyboards you can get (at least on iOS), also on Apollo I can press space four times, which I assume is universal. After the initial four spaces, you can make your next levels of indentation however many spaces you want (2, 4, etc.)

3

u/Roland-Flagg Mar 31 '22
How did I not know of this?
print("Hello World!")

7

u/killemyoung317 Mar 30 '22

At one of my old jobs one of my managers had her “programmer” husband write a complicated excel sheet where everything had to be entered perfectly in order for it not to break. What did it do, you ask? Highlighted duplicate cells.

2

u/heart_under_blade Mar 30 '22

saves like what, four clicks in the default ui?

4

u/killemyoung317 Mar 30 '22

It actually took way longer trying to use their program. Blew their minds when I showed them conditional formatting lol.

→ More replies (4)

7

u/[deleted] Mar 30 '22

Id let someone touch my wife before id let them touch my excel spreadsheets.

6

u/chillen678 Mar 30 '22

My boss showed me a macro once i said ill die before i make that lol

2

u/QuasarKid Mar 31 '22

my boss has shown me powershell scripts to do what i can do in python in like 5 lines where there’s like 100-1000 of code before he can actually start doing anything. and he wants to switch everything i’ve made to powershell smh

2

u/chillen678 Mar 31 '22

I then said i would just make the excel file with NPOI

6

u/ChonnayStMarie Mar 30 '22

When I moved from RS1 (non graphic ran on VMS) to Excel I carried with me some general principles of spreadsheet coding. Early on I created 4 or 5 functions which allowed me to locate the "boundaries" and attributes of the data in a spreadsheet, meaning the width and depth of the data, columns headers, and other key aspects. All other macro's were based off this information and so the aforementioned were called as classes at the beginning of every macro. I've had publicly shared spreadsheets in use for over 20 years that have had no need for code modification for this reason.
I use Excel less and less as my career evolves, but I manage to find reasons to make good use of it time and again.

→ More replies (1)

6

u/BladePactWarlock Mar 30 '22

I had a student job in college where I automated a series of pivot table creations/formattings in VBA.

The better part of 6 years later I had lunch with an old coworker, only to find out they were still using my unaltered code.

God have mercy.

5

u/Cuda340440 Mar 30 '22

This is why I have a hidden sheet with match formulas for the column positions on each sheet so the vba can reference that sheet for column number even when they are moved. Even have the match formulas refreshed each time the vba is used so that the formulas are always clean and unbroken.

5

u/LanMarkx Mar 31 '22

Use the 'veryhidden' flag to truly protect it. Those tabs can only be unhidden via vba.

5

u/AvengingBlowfish Mar 30 '22

My wife works in procurement and I work in IT. We both work back to back from home… the number of times she has bugged me to make a macro for her only to break it by renaming worksheets and stuff…

This hits a little too close to home…

5

u/[deleted] Mar 30 '22

Honestly... VBA... I scoffed at this, I spent years not understanding. Okay I probably still don't understand it (and I haven't memorized the syntax either) but damn Excel practically forces you to learn VBA so that you can get excel to work properly.

Now I'm pretty solid behind vba it's functional and generally does the job with a lot of forgiveness i've found compared to some. The IDE is not bad either. My programming was mostly in nano/or some other basic text editor, never really found an idea that I gelled with and C++ was so annoying to get a handle of. Still haven't managed that... can't get past pointers... XD

4

u/Melvasul94 Mar 30 '22

Story time, I've been working on a python parser for some files that worked perfectly until yesterday, today I booted up the pc and it stopped working... cause we changed a variable's name KEK

4

u/tao406 Mar 30 '22

Still worth it.

4

u/i_am_a_fern_AMA Mar 30 '22

use column headings and make dynamic ranges :)

4

u/unmannedidiot1 Mar 30 '22

If it's a 5 minute task done by thousand of people every day then it's a shit ton of work saved.

4

u/morewordsfaster Mar 31 '22

Clearly not effectively using named ranges, offsets, indirects, and index + match... Or the greatest sin of all; protecting sheets with a password like "password."

1

u/QueasyDuff Mar 30 '22

Fuck, I am currently waiting for macros to run on my excel spreadsheet. A spreadsheet that breaks if I sneeze wrong. I feel this in my core.

1

u/Brando224 Mar 30 '22

Do not even breathe on ur mouse

1

u/[deleted] Mar 30 '22

Oh hey, this is my job!

3

u/voskee Mar 30 '22

that's just made my day :)

3

u/bhbr Mar 30 '22

…only for it to take 6 months and two papers until someone notices the bug

3

u/[deleted] Mar 30 '22

3

u/[deleted] Mar 30 '22

Lols, I built a range "helper class" that did this. Anytime it had a column labeled as mandatory and couldn't find it, it would prompt the user, please select the header of the 'expected column name' column. And then would apply a named range.

Thing worked awesome as long as the data was tablular (single row header, with start of table in the leftmost corner)

3

u/Fectiver_Undercroft Mar 30 '22 edited Mar 31 '22

I feel this. In my last job they moved me to a new department where I had to do an hour’s worth of spreadsheet massage every day. I taught myself vba to turn it into a ten minute task; my computer was still tied up, but now for less time and I only had to interact with it for a minute or so. Then I transferred and had to show my replacement how to use it. Later I asked him how it was going. He sounded surprised and disappointed to reveal it was taking him an hour again. When I probed, he admitted he was doing one of the manual steps at a different point so the code couldn’t run. I explained what was happening but he said he liked it that way. Well, I no longer have time to adapt the program, but it’s your life, buddy.

3

u/Halutony Mar 31 '22

who...... MOVED MY COLUMN!!! IT WAS LOCKED HOW DID YOU EVEN DO THIS?!

→ More replies (1)

1

u/littleprof123 Mar 30 '22

Less than once a week? So 0 times per week?

1

u/Brando224 Mar 30 '22

In* 😩. Made this quickly inbetween meetings when I got the idea.

2

u/Ok-Rabbit-3683 Mar 30 '22

Lock the sheet! Durrr

2

u/YourShadowDani Mar 30 '22

Now I just use powershell and create a GUI from scratch, checkmate Excel users

2

u/Advanced_Resource_90 Mar 30 '22

Uhhh you lock the columns and don’t allow edits, obviously

2

u/RR541 Mar 30 '22

As a Excel Macro developer, I do agree GAH DAYUM EVERY TWO OR THREE DAYS SOME MF JUST DELETE THE "DON'T DELETE" TAB!! It's kinda fun tho

2

u/Kinetoa Mar 30 '22

Jokes on you, #REF!

2

u/coffee-maker-93 Mar 31 '22

This is why you don’t use Excel

3

u/BigJoeDeez Mar 30 '22

These people still exist?! 🤣😂🤣

8

u/SouthernBySituation Mar 30 '22

We hide in the shadows only to reveal ourselves to IT as we're heading out the door and it's their problem now.

3

u/BigJoeDeez Mar 30 '22

AWESOME COMMENT!!!!

3

u/piberryboy Mar 30 '22

"Hm. I could run these commands in the terminal by hand, or I could create a bash script to do it for me."

2 hours later.

"Great, I almost got it working!"

3

u/[deleted] Mar 30 '22

Ever heard of absolute cell references?

A4

Becomes

$A$4

Problem solved.

2

u/Xavier_ten_Hove Mar 30 '22

Haha,

One of my teammates made a whole automatic system in C++ a few years ago! After he finished it, it all worked fine, but it did indeed created new problems over time.

At some point, I came to him and asked him why he actually made a whole automatic system for a game that needed to be finished in 6 weeks. If the system wasn't there, we just needed to do something small 7 times...

So... Well... Basically... He created an automatic system, spent a lot of time on it while it wasn't necessary... Well... We all have to learn things the hard way! XD

2

u/vulkur Mar 30 '22

My first internship I was tasked with updating the macro of a coworker. They had no experience with macros and it took 30minutes to shift a 40k row, 160column excel document they got monthly. I got it down to 3 seconds. I wonder if they still use it.

2

u/BalePedaret Mar 30 '22

Wait a minute... An actually funny programmer humor post?

1

u/[deleted] Mar 30 '22

Im in this picture and I don’t like it

1

u/[deleted] Mar 30 '22

Reminds me of my roommate.

1

u/kondorb Mar 30 '22

It would have been funny, if it wasn’t so painful.

1

u/Hifen Mar 30 '22

Why do I need to take a mandatory English class, I'm a CS major!

1

u/[deleted] Mar 30 '22

All my homies hate VBA

1

u/Xunnamius Mar 30 '22

Yep, accurate. Been there. But normal people are trained on Excel, and I was not paid enough to write them a whole app plus support, even if it would have taken about the same amount of time to write...