cathyw: Gromit pouring tea (Default)
It is annoying when Excel mistakenly thinks this number you just put in is a date. The converse of that is that Excel makes it *really easy* to do math on dates and times as long as your year is after 1899. (*)

Dates are integers - 0 is the imaginary date of "1/0/1900", so 1 is 1/1/1900, 2 is 1/2/1900, 3 is 1/3/1900, and so forth.

Times are decimals - 0.25 is 6 AM, 0.6666666667 is 4 PM, 0.4564318997841 is 10:57:16 AM, and so forth. (**)

I can make a column with evenly spaced time data by entering my start time in A1, entering in A2 "=A1+X/24", and then copying A2 down the column - voila, timestamps every X hours!

If I have a column A in my spreadsheet that is dates and a column B that is times, I can make column C where I literally just add 11/3/2023 and 2:00 AM and get 11/3/2023 2:00 AM.

I can find out how many days passed between two arbitrary dates by subtracting (and then probably reformatting the results as a number, because 1/17/1900 is not quite the answer I'm looking for.) Or how many hours between two arbitrary times by subtracting and then multiplying by 24. (If I need HH:MM:SS and the value is less than 1, I can just reformat the result to a time.)

...and the cool thing I do a lot: I need to calculate a volume from timestamped flow rate data. Since my flow rate is in gallons per day and my timestamps are in days (even though they look like ordinary timestamps), I can multiply the flow rate by the difference between the timestamps even if they are not equally spaced and add up the incremental totals: voila, gallons. (***)

This has been Today's Excel semi-pro tip. Go forth and calculate!

(*) any of this may or may not translate to your preferred spreadsheet platform. One hopes that it does, just in the name of interoperability.

(**) much as I hate to give Microsoft credit for anything, this is an *extremely sensible* way to handle dates for nearly any purpose. We had the Y2K bug, and Unix timekeeping (seconds since 00:00:00 1/1/1970) will overflow in January 2038. Representing time as a floating point number uses a bit more memory, but it won't run into issues related to the number being too large for an extremely long time... and it makes doing math with dates really easy for our human brains to comprehend.

(***) some of you may recognize this as a method for numerical calculation of an integral, and not the most accurate one. It is Good Enough for my purposes. It is also so much easier to do this in Excel than in FORTRAN, let me tell you...
cathyw: Gromit pouring tea (Default)
Lab data at my workplace is kept in a bog-standard SQL database with a custom web interface. Part of this interface lets me run a query and then, in theory, export the results to a lovely Excel spreadsheet, or PDF, or a couple other formats. I do this to transfer the lab data to other spreadsheets and do lovely charts of data trends and the other things one might want to do with lab data.

Back in early March, the "export" function stopped working - but only when I was working from home. I clicked the "export" button, and it indicated that it had been clicked, but it did not export my data. Sitting at my work desk, plugged into the docking station, I can export data until my data cup runneth over.

IT's assumption is that it's a "me" problem. We did some troubleshooting.
- Did Husband change a setting on the PiHole? He did not, but also he turned it off and it didn't help, and also he didn't see records of anything from my work network being blocked.
- Is it something weird with our home wifi? It is not; the problem occurred when I worked at the library or in the waiting room of the hospital.
- Is it something weird with the VPN connection? It is not; the problem occurred while sitting at my desk if I unplugged from the docking station and went on the workplace wifi network, no VPN required.
- Is it some kind of hardware problem? It is not; they had me test it on a random laptop that they had on hand, and also gave me an entirely new laptop, and the problem still occurred on both those computers.
- Is it some kind of problem with my account on the database server? It is not; "unplug from the docking station" made the problem happen - mostly - for two other people. ("mostly" being that one of the other two could export one of my two daily-use reports but not the other. wtf?)
- likewise when I was working at Husband's desk and plugged into his docking station I could export the same one report the other person could - but he says his docking station is on the house wifi.

At this point, I think it's a really bizarre networking problem - perhaps they did something to the firewall that had unexpected results? but a) they say they have made no changes, and b) while the IT person I'm working with has observed me having the problem he has never been able to duplicate it for himself, so he still thinks it's a "me" problem somehow even though he can't think of anything else "me"-related that we haven't ruled out. (also that implies he did not believe me when I said I had successfully duplicated the problem with two other people, ugh...)

IT person wants to refer the problem to the vendor, but they will not help us because we are not upgraded to the latest version, which was not going to happen any time soon.

Fast forward to yesterday. IT person calls, along with the person managing the software upgrade (who has not previously been involved with troubleshooting). They watch to see exactly what I'm doing and exactly what happens when I click the "export" button. IT person follows along on his own machine and does not experience the problem, but the software manager does! (SO now IT person believes me that it's not a "me" problem. Yay, I guess?) We poke all the buttons. We find that in order for the data to export, I need to enter the date in a particular date field, even if that date field was previously pre-filled with the right date.

"?????," we all said. But at least now we have a solution even if it sheds no light on the problem?

"Except," IT guy says, "I think it has to do with the display settings." I did acknowledge that when I got it to *slightly* work on Husband's docking station, I had it on one of his external monitors.

Today, at my desk, I put this to the test. Instead of running the query in a browser tab on my nice big external monitor, I moved the tab over to the laptop screen without changing anything else from "known good".... and whaddayaknow, instead of behaving itself, it would not export the data unless I touched that one particular date field.

I do not understand. I do not understand why the display settings matter to whether the "export" button works or not. I do not understand why entering the date makes the "export" button work. This is the equivalent of going to the mechanic, telling him "the car won't shift from 3rd to 4th between 8 and 11 PM," and the solution being to turn the windshield wipers on and set the radio to a specific station. I do not understand why the problem began suddenly during a time period when they said they did not change anything about the software.

I suppose ultimately it doesn't matter if I understand? I can get my data from home again. But this will nag at me for days.
cathyw: Gromit pouring tea (Default)
Problem: spreadsheet on network share is suddenly announcing that it is not in a Trusted Location and therefore it will Absolutely Not entertain the idea of running its macros.

Befuddlement: it did this last fall and we fixed it? why is it unfixed?

Solution: when we fixed it last fall, we spelled out the full path to the network share folder. apparently last Friday they did something to the network that made \\server.path.my.work\Folder different from Z:\Folder, where Z: is where the server gets mounted.

Further befuddlement: why on earth is OUR OWN NETWORK SHARE not a trusted location? but. ugh.

dear Excel,

Aug. 3rd, 2023 08:44 pm
cathyw: Gromit pouring tea (Default)
why can you make a graph without a primary horizontal axis?

isn't a primary horizontal axis an essential component of a graph, such that if you do not have an axis, you do not have a graph?

signed,
me (baffled) and one intern (confused and frustrated).
cathyw: Gromit knitting in bed (gromit)
I am the person you want to ask for help with your spreadsheet-related homework.

just sayin'.

(colleague had a homework assignment that involved visually inspecting data and counting things and painting boxes colors so you'd know what had been counted and I was like 'what???' and it took me 30 seconds to devise a procedure for letting Excel do the counting for you...)

Profile

cathyw: Gromit pouring tea (Default)
Cathy

January 2025

S M T W T F S
   1234
567891011
12 131415161718
19202122232425
262728293031 

Syndicate

RSS Atom

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 16th, 2025 03:26 pm
Powered by Dreamwidth Studios