title: How do I make vba code compatible with libre office
body: <p>I have recently migrated to pclinuxos from windows and seem to like it. The only problem I am facing is that libreoffice, the default spreadsheet package is not compatible with excel macros. Below is the vba code I have:</p>
  
  <pre><code>Option VBASupport 
  Sub DeleteToLeft()
      Selection.SpecialCells(xlBlanks).Delete shift:=xlToLeft
  End Sub
  Function SinceLastWash()
      Application.Volatile
      WashCount = 0
      WearCount = 0
      CurrentRow = Application.ThisCell.Row
      For i = 3 To 35
          If Range(Cells(CurrentRow, i), Cells(CurrentRow, i)).Value = "a" Then
              WearCount = WearCount + 1
          End If
          If Range(Cells(CurrentRow, i), Cells(CurrentRow, i)).Value = "q" Then
              WashCount = WashCount + 1
              WearCount = 0
          End If
      Next i
      SinceLastWash = WearCount
  End Function
  Function testhis()
  testhis = Application.ThisCell.Row
  End Function
  </code></pre>
  
  <p>Is there a way to convert this code to make it compatible with libreoffice or do I have to learn an altogether new language like python? Learning python would not be a problem but is not a solution to my problem as I have many work related files in excel which have a lot of vba code and it is not possible for me to use open office/libreoffice at work...</p>
  
  <p>I just want to add that the function SinceLastWash gives the correct value in some cells where I use it and in others gives an error, #NAME?</p>
  
  <p>Thanks </p>