▲ 3 r/vba

Why does Ln Col indicator flicker?

Why does the Ln Col indicator flicker? More to the point: is there a way to stop it?

I don't believe it always did that. Might be wrong.

And the flicker rate seems to increase when I put the cursor in the Ln Col field. Might be wrong

(I was not allowed to paste an image into the OP. I'll try to add it in a comment.)

reddit.com
u/Curious_Cat_314159 — 6 days ago

Given linear regression y = mx+b, how to estimate x based on required y?

Given x (hours studied) and y (score on test) data and the linear regression y = mx + b, if we want to estimate x based on y (i.e. how many study hours are needed to achieve a given score?), is it correct to calculate x = (y - b) / m?

Or should we estimate x from the linear regression x = my + b, with different m and b?

The results can be significantly different.

In the example below, for a score of 90, the estimated study hours are 6.801 for x = (y - b) / m, but 6.267 for x = my + b.

https://preview.redd.it/ury37r1zq0fh1.png?width=916&format=png&auto=webp&s=dd295b82812b8a59bb36fdf9dc61eda44cbc0e08

.....

reddit.com
u/Curious_Cat_314159 — 28 days ago

How to write "percentage" answers (US)

UPDATE.... The response from u/educational_two682 resolved my question. Thanks again.

I've been out of school for 50 years, and I don't do modern tests and math assignments myself. But sometimes I help students who do. So, I am wondering what are acceptable forms of answers in the following situation. Note: I am asking from an American perspective, if that matters.

[EDIT.... I have limited my question to just algebraic answers. Thanks to u/master-education7076 for noting additional ambiguities with my now-removed numerical examples. That was not my intended focus.]

Consider a recent algebra problem. We calculate that x-65 employees are in one category out of a total of 2x-65 employees, and the question is: what percentage [sic] of the total are in that category?

All of the following forms are equivalent mathematically: (x-65) / (2x-65) ; ( 100*(x-65) / (2x-65) )% ; and 100*(x-65)% / (2x -65).

But again, is only one form allowed? Is one form preferred? Or are they all equally acceptable forms?

Aside.... I have even seen c. Note the space before "%" and the absence of disambiguating parentheses. Mathematicians probably have no issue with that form because "%" should be interpreted as "/ 100", so standard math should parse that as

( ( 100*(x-65) ) / (2x-65) )%

But Excel, Google Sheets et al parse 100*(x-65) / (2x-65) % as

( ( 100*(x-65) ) / ( (2x-65)% )

Let's not digress. It is what it is.

But for completeness, is 100*(x-65) / (2x-65) % without disambiguating parentheses allowed? Preferred? Acceptable?

reddit.com
u/Curious_Cat_314159 — 1 month ago

Intentionally trick question or typo or my bad?

In a puzzle section of a local newspaper, the question asks (see the complete context below):

>If X employees are over the age of 40, then in terms of X, what percent of those employees are at or under the age of 40?

I think the answer is zero. If "those employees" are "over the age of 40", none is "at or under the age of 40". Right?!

I suspect that X and "those" employees are supposed to be "total" employees.

Otherwise, what sense can a percentage "in terms of X" (#employees over the age of 40) mean?

The full context is:

At a company, there are 65 more employees over the age of 40 than
employees at or under the age of 40. If X employees are over the
age of 40, then in terms of X, what percent of those employees
are at or under the age of 40?

TIA for your thoughts.

reddit.com
u/Curious_Cat_314159 — 1 month ago
▲ 5 r/vba

How to use range.RemoveDuplicates in Excel VBA?

(Learned later that I should use [Excel] prefix in the title. Cannot edit title. But the information is there.)

In Excel VBA, I want to select a range (n rows, m columns) and remove duplicates.

The following works for 7 columns:

r.RemoveDuplicates Columns:=Array(1, 2, 3, 4, 5, 6, 7), Header:=xlYes

But I want it work with a variable number of columns.

I've tried the following. None works.

' Selection should be the upper-left corner (header row)
Set r = Range(Selection, Selection.End(xlDown).End(xlToRight))
r.Select

r.RemoveDuplicates
r.RemoveDuplicates Header:=xlYes

ncol = r.Columns.Count
ReDim dupecol(1 To ncol)
For i = 1 To ncol: dupecol(i) = i: Next
r.RemoveDuplicates Columns:=dupecol, Header:=xlYes
r.RemoveDuplicates Columns:=(dupecol), Header:=xlYes

The first two RemoveDuplicates simply do nothing (!).

The last code snippet results in error 5: invalid procedure call or argument in both cases.

I confirmed that r.Address, ncol, Typename(dupecol), dupecol(1) and dupecol(ncol) are what they should be.

Any idea how to make it work without using hardcoded Array(...)?

EDIT.... For testing purposes, I used the same conditions that worked with hardcoded Array(...). So, r.Address comprises only 7 columns, multiple rows and no adjacent data; ncol is 7; Typename(dupecol) is Variant(); LBound(dupecol) is 1 (*); UBound(dupecol) is 7; dupecol(1) is 1; and dupecol(ncol) is 7.

(*) UPDATE.... As u/ZetaPower noted, LBound must be zero for it work with RemoveDuplicates Columns:=(dupecol). That is, it requires ReDim dupecol(0 to ncol-1).

reddit.com
u/Curious_Cat_314159 — 2 months ago

How to calculate radius of sphere that inscribes cube of known dimensions?

Errata.... The title should say __circumscribes__, not inscribes. Mea culpa!

The following problem appeared in a local newspaper:

Apologies for the size of the image. And AB and AC should be dotted lines; i.e. they pass behind the faces of the cube.

One solution is apparent (*) __if__ AB is the diameter of the sphere.

But how do we know that AB passes through the center of the sphere?

-----

(*) __If__ AB is the diameter, we can calculate the radius by the following:

radius = AB / 2

AB = √(AC^(2) + BC^(2))

AC = √(AD^(2) + CD^(2))

AD = CD = BC = 6

Thus:

AB = √(AD^(2) + CD^(2) + BC^(2)) = √(3 · 6^(2)) = 6√3

radius = AB / 2 = 3√3

reddit.com
u/Curious_Cat_314159 — 2 months ago

How to export RR data using Polar Flow web service (flow.polar.com)

(Apologies for the size of the images, notably the second one. I have posted images to other subreddits before, albeit it in comments, not an OP, and they have always been a reasonable size. And they are a reasonable size when I compose and edit this posting. I don't know how to control their final size. :sigh: )

How can I export RR data using Polar Flow web service (flow.polar.com)?

I used an H10 with the Polar Flow app (Android) to collect data in Training mode.

Then I look at the uploaded data using the Polar Flow web service (flow.polar.com).

According to the support.polar.com page "Heart rate variability (HRV) data file export in the Flow Web Service" (click here), I should see the following option:

https://preview.redd.it/c3qmvxndi44h1.png?width=639&format=png&auto=webp&s=cfe5660aafcd6b29bc0f1c1394d16b21d465d688

And I know that used to be the case. But instead, the latest version of flow.polar.com shows

https://preview.redd.it/jjthu3goi44h1.png?width=166&format=png&auto=webp&s=e6e750938ff27eaf62a8836f049f3d0d7f3b5df5

When I select Session (CSV), I see only the HR data.

reddit.com
u/Curious_Cat_314159 — 3 months ago

How to enable cookies for Polar Flow on Samsung Galaxy 23 (Android)?

Disclaimer: Techno-dinosaur here. Forgive me if the question is not appropriate for this subreddit. Please LMK.

Just installed Polar Flow on my Samsung Galaxy S23 (Android). When I tried to sign in (I believe my existing Polar Beat / online Polar Flow login should work), I get an error to the effect: "cookies are disabled / enable cookies".

According to Google A(rtificial) I(ncompetence), that means I should enable third-party cookies in my browser (!), which is Chrome.

But Chrome Settings says that third-party cookies are enabled (!).

Can someone kindly (please be kind) help me get past this problem and get started with PF?

TIA

-----

Edit.... I wrote:

>that means I should enable third-party cookies in my browser (!), which is Chrome

And I when click the 3-dot icon, the menu says "running in Chrome".

But Google AI confirms my expectations: "Apps on the Samsung Galaxy S23 run natively on the device, not in a web browser like Chrome".

So, that seems to be my problem: somehow I installed a Chrome app (?) instead of phone app (?).

(FYI, in the Play Store, I selected "polar flow app".)

Perhaps I need to speak with tech support for my phone. But I'm still hoping someone here can offer some guidance.

reddit.com
u/Curious_Cat_314159 — 3 months ago

Is it safe now to update H10 firmware?

Disclaimer: Forgive me if this has been discussed ad nauseam. I haven't been tracking this subreddit closely.

Is it reasonably safe now to update H10 firmware?

That is, have the installation and use of the latest update been relatively worry-free?

I am always wary of updates for fear of introducing new defects. I depend on these products almost daily.

Case in point: PB for Android version 3.5.12 (5/7/26) was followed just 5 days later with version 3.5.13 (5/12/26) to fix "a bug causing the app to crash".

Coming so closely together, I wonder if the new bug was introduced by the changes in 3.5.12.

(Oh, I see that I am now using PB version 3.5.13 (!). It must have updated automagically and silently. I did notice a change in behavior just recently. Now I know why. Klunk!)

I haven't updated H10 firmware since the paired releases 4.0.4 and 4.1.10 (12/4/25). And even then, I waited until Feb, when I was troubleshooting some (unrelated) problems.

I've been ignoring PB prompts to update for quite a while -- probably since Mar 4 (!), the release of H10 version 4.2.0.

I don't believe I have had any issues with the H10. "Don't fix what ain't broke".

OTOH, I'm getting tired of having to by-pass the update prompt.

reddit.com
u/Curious_Cat_314159 — 3 months ago

Is my Medtronic MCL phone app paired with my Medtronic ICD?

Disclaimer: I know next to nothing about Bluetooth tech. So I might misuse the terminology.

According to Medtronic documentation, my Medtronic MCL (MyCareLink) phone app uses BLE to connect to my Medtronic ICD/pacemaker.

But I do not see the ICD in the list of paired Bluetooth devices on my phone.

Moreover, I never consciously paired the phone (app) to the ICD.

However, the pairing (if any) might have been done automagically when I log into MCL app -- which itself is done automagically, at least after the first use after installation.

So, my naive questions are....

  1. Is it possible that the MCL app (or phone) is not paired with the ICD?

  2. If so, does that limit my use of other Bluetooth devices on the same phone, which might or might not be paired with their devices?

In particular, can I use a Polar H10, which also uses BLE and which does appear in the paired-device list?

  1. Or if the ICD is paired automagically, how do I confirm that on my Samsung Galaxy S23 phone? As I noted, I do not see the ICD after completing a Bluetooth scan on the phone, even while the MCL app is running.

  2. Finally, assuming the ICD is indeed not paired, is there some benefit to pairing it? And how might I accomplish the pairing?

According to the app set-up instructions in the MCL user guide, "the pairing process may take up to 6 minutes". But it does not give step-by-step instructions for initiating the pairing process, other than after installation, "follow instructions to connect your heart device" and "create a password". I presume I did that (long ago).

OTOH, according to the FAQ in the MCL user guide, "before using a second mobile device [e.g. to allow MCL tracking on a caregiver's phone], you have to pair your first mobile device". Why would it say that if I have to pair the "first" (only) mobile device, in the first place?

Aside.... I should be able to ask Medtronic these questions. But (a) I cannot get through to their support staff; and (b) I'm not confident that they would understand the questions and provide accurate answers. Arguably, I'm taking the risk by posting to this forum. TBD.

reddit.com
u/Curious_Cat_314159 — 3 months ago

EXACTLY how much HR data can the H10 store offline?

EXACTLY how much HR data can the H10 store offline?

I'm sure that question has been asked and "answered" many times over. But I am finding ambiguous information.

First, I am surprised that I cannot find that answer in the H10 User Manual ( https://support.polar.com/e_manuals/h10-heart-rate-sensor/polar-h10-user-manual-english/manual.pdf ).

(Can you?)

But according to https://support.polar.com/us-en/how_long_a_training_session_can_i_record_with_h10 : "H10 records HR data once per second and the training session can have data up to +30 hours".

What is the significance of the plus sign ( + )?

Is that exactly 30 hours; i.e. 108,000 HR values (30 * 3600)? If so, why not write simply 30 hours?

Or is that approximately 30 hours; i.e. 30+ hours, as Google A(rtificial) I(ncompetence) interprets it? If so, what is the exact number of HR values?

Or why can it be only approximate; i.e. variable? What does it depend on?

reddit.com
u/Curious_Cat_314159 — 3 months ago