Meus caros, preciso de uma ajuda com macros para Calc O MS-Excel possui um recurso de dados chamado 
"Remover duplicatas". Esse recurso mantem o primeiro registro e apaga os registros seguintes que 
possuem o valor de um determinado campo em duplicata.
Não localizei recurso semelhante no Calc e, por isso, criei uma rotina. O problema é que, como não 
domino a estrutura da linguagem utilizada no Calc, criei essa rotina em VBA.Agradeceria muito se 
alguém pudesse converter esse código para que eu possa incluir no Calc.
Segue a rotina em VBA
Sub RemoverDuplicata()Dim ul, r As Long    'armazena a última linha com a primeira coluna ocupada   
 ul = Cells(ActiveSheet.Rows.Count, 1).End(xlUp).Row
    For r = ul To 2 Step -1        If Cells(r, 1).Value = Cells(r - 1, 1).Value Then            
'Remove o registro deslocando as celulas inferiores para cima            ActiveSheet.Range(Cells(r, 
1), Cells(r, 3)).Delete shift:=xlUp        End If    Next rEnd Sub
Denis Dobbin
-------------------
-- 
Você está recebendo e-mails da lista discussao@pt-br.libreoffice.org
# Informações sobre os comandos disponíveis (em inglês):
  mande e-mail vazio para discussao+unsubscribe@pt-br.libreoffice.org
# Cancelar sua assinatura: mande e-mail vazio para:
  discussao+unsubscribe@pt-br.libreoffice.org
# Arquivo de mensagens: http://listarchives.libreoffice.org/pt-br/discussao/
Context
- [pt-br-discussao] Remover duplicatas no Calc · DenisDobbin
 
  Privacy Policy |
  
Impressum (Legal Info) |
  
Copyright information: Unless otherwise specified, all text and images
  on this website are licensed under the
  
Creative Commons Attribution-Share Alike 3.0 License.
  This does not include the source code of LibreOffice, which is
  licensed under the Mozilla Public License (
MPLv2).
  "LibreOffice" and "The Document Foundation" are
  registered trademarks of their corresponding registered owners or are
  in actual use as trademarks in one or more countries. Their respective
  logos and icons are also subject to international copyright laws. Use
  thereof is explained in our 
trademark policy.