Fix my Libre Office Makro

Job ID: 31705366

Budget: $50 – $100 USD

My macro doesn't give me the correct values. The first three steps work, but not step No. 4. The orignal programmer does not know how to fix this. Perhaps this only requires a minor tweek. I posted the original posting again in it's entirety, but only step No. 4 which is the most tricky one needs to be fixed.

I have two programs out of which I export different data in the form of ods files and I need to compare some of the data in the tables.

1) First I need to convert some of the data.

In file A in colmn B there is either an S or an H
If there is an S in column B then the value in column A should be multiplied with -1
IF B=“S“ then A=A*(-1)

2) In file B in column G my program exports negative values with a ' in front of the value
This needs to be removed
so '-38,81 -> -38,81 '-61,74 -> -61,74 and so on

3) In file B the colums F and H have corrosponding values to columns K and G in file A.

I uploaded pictures of three examples. I highlighted them with colors so that you can see them better.

As you can see, column F in file B corrosponds to column K in file A, column G in file B to column A in file A and column H in file B to column G in file A.

The purpose of the macro is to compare the values in columns G in file B and column A in file A.

Now comes the tricky part.

4) As you can see with the light green example in file A sometimes the values are split between different rows. Row 9 in file B corrosponds with rows 7 and 8 in file A,

In this example 545,64 in file B = 483+62,64 in file A.
Related categories: Visual Basic LibreOffice