Bug 131462 - MACRO WILL NOT COPY CELLS VALUES WHOSE CELLS HAVE VLOOKUP INDEX>2
Summary: MACRO WILL NOT COPY CELLS VALUES WHOSE CELLS HAVE VLOOKUP INDEX>2
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.4.1.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-21 12:08 UTC by romrodz77@outlook.com
Modified: 2020-03-22 08:58 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
a simple spreadsheet to check the bug (214.56 KB, application/vnd.oasis.opendocument.spreadsheet)
2020-03-21 12:12 UTC, romrodz77@outlook.com
Details

Note You need to log in before you can comment on or make changes to this bug.
Description romrodz77@outlook.com 2020-03-21 12:08:23 UTC
Description:
I made a macro to copy table A and paste its values (paste special) into table B.
Those cells having a vlookup function with index>2 will not be copied.

I have attached a spreadsheet with a macro that copies the values from the table B (range AT18 BF247) into the table A on the left (range B18 N247).
The macro is activated by the button UPDATE. Look at the brown columns in table A on the right, press the button at B210 and look at the brown columns in table B. Those values whose origin have vlookup functions with indexes > 2 are missing. To check this bug, modify the indexes to 1 or 2, press the button and it will work.
(some cells in the brown columns are just values, =strings, etc, to check the hypothesis).

Steps to Reproduce:
1. OPEN THE ATTACHED DOCUMENT (ALLOW MACROS)
2. PRESS THE "UPDATE" BUTTON.
3. BROWN COLUMNS HAVE NOT BEEN COPIED IF THEIR ORIGIN HAVE A VLOOKUP FUNCTION WHOSE INDEX IS >2

Actual Results:
 BROWN CELLS IN ROWS 218 AND 227 ARE BLANK.

Expected Results:
 BROWN CELLS IN ROWS 218 AND 227 SHOULD HAVE THEIR VALUE COPIED.


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
Versión: 6.4.1.2 (x64)
Id. de compilación: 4d224e95b98b138af42a64d84056446d09082932
Subprocs. CPU: 8; SO: Windows 10.0 Build 18363; Repres. IU: GL; VCL: win; 
Configuración regional: es-ES (es_ES); Idioma de IU: es-ES
Calc: CL
Comment 1 romrodz77@outlook.com 2020-03-21 12:12:13 UTC
Created attachment 158848 [details]
a simple spreadsheet to check the bug

A simple spreadsheet to check the bug.
Comment 2 Oliver Brinzing 2020-03-22 06:57:00 UTC
You need to change the macro to make it work - telling LO to copy formulas instead of values:

from: args39(0).Value = "SVD"
to:   args39(0).Value = "SVDF"

and you have to adjust the vlookup cell ranges from relative to absolut adresses.
Comment 3 romrodz77@outlook.com 2020-03-22 08:58:23 UTC
Thanks for your answer.

So, was it a bug or just something I was doing wron?

In other words, your solution is a workaround?