Hello everyone.
I am working on a project that has a lot of spreadsheets each containing thousands of duplicates, which I must remove. I used Mr. Charles H. Pearson 's DeleteDuplicateRows script in order to try and delete the duplicate rows found in the spreadsheets. You can find his original code here and I will also attach below the function I created using his code.
Now the problem: I want to run the code twice, each time for different columns: first at a column representing the code and the second represents text description. Now, you might ask yourself why I am running it twice, or even the reason why I am using Mr. Pearson's method since Excel carries its own removeDuplciate function. The answer to the first question is a little strange: It seems that the unique code that represents each of the inputs is NOT unique; therefore there could be some duplicate text description under nonduplicate unique identification code. The answer to the second question is simple: VBA's remove duplicate function doesn't seem to be working on my Version of Excel (Office for Mac 2011).
Anyhow, back to the real problem: I can easily run Mr. Pearson's code using the first column and it will definitely work, but when I try and use it in the second column it will give me the following message: Run-time error '1004'. \n Method 'CountIf' of object 'WoorkSheetFunction' failed.
I have been trying to find a solution and or reason to why this is happening and what I could come up with is that - and please correct me if I am wrong here - the text second column (text description) contains more than 255 characters. Now I did find a solution for such problem here at the forum: use SumProduct instead of CountIf, but it still didn't work and I got the same message.
Does anyone know anything about what's going on?
An example of an unique indetification number and a text description:Please Login or Register to view this content.
Document globo00020010924ducv00v8b
Boris Tabacof, da Bracelpa, tem insistido com seus pares na Câmara de Comércio Exterior, sobre a importância de incluir a celulose nos mecanismos de financiamento aos produtos industrializados de exportação. Temos de ampliar a participação desse insumo na pauta para maximizar as vantagens comparativas brasileiras, minadas pelos financiamentos de longo prazo a juros baixos de nossos competidores.O Tesouro deu um jeitinho para conseguir cumprir a meta de superávit primário de R$ 12 bilhões em 98.Transferiu para janeiro o pagamento de 70% do salário do funcionalismo.Incertezas de fim de ano. Ontem, a direção da Ford passou o dia preparando rotas de fuga para seus executivos caso a fábrica seja tomada pelos trabalhadores, segunda-feira, em protesto contra as demissões.A partir de amanhã, a Ufesp fica congelada e as dívidas do ICMS passam a ser corrigidas pela taxa Selic.Silvia Penteado (interina) DIRETO DA FONTE. (c) 1998, AGÊNCIA ESTADO LTDA.
Bookmarks