Finally got my macros working. It was a lot of trial and error. I can tell you this, no way I could have coded this thing. It was weird too, like it would want me to change something, but when I’d look at the code and it would be exactly the same , and it would just brush it off.
There was one hiccup I kept running into where SAP would export data into a spreadsheet that was temporary, but before we could grab it it’d disappear. Tried multiple iterations, tried a delay, etc.Finally I just suggested we name the sheet and save it and that worked.
All in all I plan on making a whole bunch more tools to run cost reports and man hour reports.
I've never used macros with Excel, but I (unfortunately) use many of its core functions regularly. MS Excel is.....a temperamental beast. I've learned to do some things twice, because there's often times when it bizarrely does a half-ass job. For example, when sorting by a column, I'll sort it twice, because there's too many times where it looks sorted, and it mostly
is sorted....but it's not 100% sorted. Things like that.
There are things which sometimes work, and sometimes they don't, and it's the exact same button, or process, or formula, or whatever. I'm not surprised that macros have the same problem. I'd honestly hardly ever use it if I didn't have to. I'd prefer to wrangle my data in Python, but in my position I can't just do my own thing. I'm confined to the processes of my team/department, so everything has to be accessible to everyone else and have our "standard workflow" or whatever. So......Excel. *sigh*
It's good for what it is, but it sure is a quirky mofo.
I admit that when it's behaving, it's great for simple tasks. There are things that it would take me a couple of minutes to think about and then code in something like Python, which are a simple click of a button or a quick copy/paste process in Excel.