title: Excel VBA function to Java poi
body: <p>I'm new to java so please bear with me. I know java apache poi has the following functions built in but I'm a little lost as to how to use it:  </p>
  
  <p>1)  code_col = WorksheetFunction.Match("Code", sheet.Range("1:1"), 0)</p>
  
  <p>2)  count = WorksheetFunction.CountIf(ref_sheet.Range("A:A"), payee)  </p>
  
  <p>3) lr = sheet.Cells(1, 1).CurrentRegion.Rows.count  </p>
  
  <p>If you could provide example of how the VBA code converts to its java apache poi equivalent it would be a great help.<br>
  So Im basically converting a VBA module to java. And I use the apache poi library. However, those 3 above lines of code I have difficulty converting to its java equivalent </p>