[Solved] ERROR Find (p, q, r) in column (T) with formulas

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
Math
Posts: 89
Joined: Mon Oct 29, 2018 6:32 pm

[Solved] ERROR Find (p, q, r) in column (T) with formulas

Post by Math »

I already have the solution to find "p", "q", "r" in the "T" column and write "x", "y", "z" in column "M", in the macro Sub strangeAgain() sr. Lupp , in the topic: viewtopic.php?f=20&t=96017&sid=df6c1b34 ... 8d67f60034

                 I ran tests on the spreadsheet without formulas in the "T" column, worked perfect for Finding "p", "q", "r" in the "T" column that has no formulas .

                 Now I was applying the macro in my file holder, which has formulas in the "T" column, the macro did not work , to locate in the "T" column that has formulas .

                 The macro does not see the letters "p", "q", "r" resulting from formulas in the "T" column .

                 I did several tests, and did not read the "T" column that has formulas .


hugs friends
Last edited by Math on Wed Nov 28, 2018 5:22 pm, edited 2 times in total.
LibreOffice 5.4.4.2 on Windows 7
User avatar
Lupp
Volunteer
Posts: 3549
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: ERROR Find (p, q, r) in column (T) with formulas

Post by Lupp »

This won't lead anywhere. If you insist on using "macros" you need to learn to understand them.
As far as I can remember you didn't mention that your texts (probably being "p" ...) are/may_be formula results. In this case the only reasonable solution is to abandon using "macros" for the task and to use formulae instead.

How to do so, see column M in the new attachment. The reworked "macro" used for column AA is very inefficient for large source ranges (1048576 rows in my example) and cannot avoid inconsistencies if the formulae used in column T can contain volatile functions. If it shall be updated after recalculations of column T the inefficiency will get terrible.

Stick to means you understand. Concerning details you are welcomed with your questions and will get kind answers. Going on the way you chose would only result in wasted time. NEVER AGAIN TRY TO "CONVERT" SILLY EXCEL_VBA MACROS. It's the wrong way. In my opinion also Excel users are encouraged to use macros mainly as a part of MS' fight against free competitors because it's a well proven way to ensure incompatibility. I will no longer support this.

I had to clip the example to get it uploadable.
Attachments
aoo96017VerySpecialCopyAndReplace_1.ods
(36.62 KiB) Downloaded 94 times
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: ERROR Find (p, q, r) in column (T) with formulas

Post by Zizi64 »

:crazy:
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Math
Posts: 89
Joined: Mon Oct 29, 2018 6:32 pm

Re: ERROR Find (p, q, r) in column (T) with formulas

Post by Math »

[SOLVED]

sr. Lupp ,

the macro performed perfect .

Many thanks, my friend .

hugs
LibreOffice 5.4.4.2 on Windows 7
User avatar
Lupp
Volunteer
Posts: 3549
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: [Solved] ERROR Find (p, q, r) in column (T) with formula

Post by Lupp »

Math wrote:...the macro performed perfect .
I feel sure this will soon turn out to be an illusion. You should really consider the relevant suggestions you got from more than one contributor here, how to work with Calc.
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
Post Reply