I am trying to convert an EXCEL spreadsheet to LibraOffice. The spreadsheet actually creates another spreadsheet consisting of 12 sheets. One for each month with 2 graphs on each sheet. I am working through the changes, and create the first sheet, up to the point of creating the graph.
Everything is done through code. This includes putting the formulas in the correct cells.
This is the code for a couple of the cells:
With Worksheets(MonthData(monthno).Mtext)
.Range(“C3”).Value = “=IF(B3>0,SUM($B$3)/COUNTIF($B$3,”">0""),"""")"
.Range(“N3”).Value = “=SUM(B3:B” & MonthData(monthno).Mlength + 2 & “)”
end with
Now when I see the result Cell C3 shows error 508. Cell N3 shows 0, as it should. All cells with formulas with more formula than cell N3 display error 508.
When I select cell C3 it shows
=IF(B3>0,SUM($B$3)/COUNTIF($B$3,">0"),"")
This is correct.there are no unbalanced parentheses. But just in case I added a parenthesis. When I hit Enter I got a message that there was an error in the formula. It showed that the correction was the same as before. When I accepted the correction, the error Disappeared.
This is just one of about 200 error codes. I do not know why it will not accept the correct values. I don’t want to have to correct these manually. Any guidance would be appreciated.
Thank you
John Crawford