Ir para conteúdo
Fórum Script Brasil

Zuchello

Membros
  • Total de itens

    1
  • Registro em

  • Última visita

Sobre Zuchello

Zuchello's Achievements

0

Reputação

  1. ola a todos. tenho um comando for que vai resultar em várias textos de celulas que possuem a string REP. Sendo cada resultado referente a uma celula diferente. necessito entrar com outro comando for para localizar a nova string gerada no primeiro find, com objetivo de colorir o interior da linha. ou seja tenho uma variavel a em uma celula E10 e na celula E50 tenho REP a, posteriormente tenho na celula E20 bc e na E55 REP bc. Sub Repetições() Dim l As Variant Dim c As Variant Dim nome As String vUltimaLinha = Cells.SpecialCells(xlLastCell).Row vUltimaColuna = Cells.SpecialCells(xlLastCell).Column For i = vUltimaLinha To 1 Step -1 For y = vUltimaColuna To 1 Step -1 Cells.Find(What:="REP", After:=ActiveCell, LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=True, SearchFormat:=False).Activate l = ActiveCell.Row c = ActiveCell.Column n = ActiveCell.Count valor = Cells(l, c).Value qbr = InStr(1, valor, " ") qtdeLetras = Len(valor) nome = Right(valor, qtdeLetras - qbr) Next y Next i End Sub agradeço a ajuda.
×
×
  • Criar Novo...