Vídeo recomendado
https://youtu.be/diWPPPhW-9E

MARCADOR DE LINHA E COLUNA

Tutoriais elaborados da comunidade
Felipe Dasi
Colaborador
Colaborador
Mensagens: 54
Registrado em: Seg Jul 05, 2010 6:56 am

MARCADOR DE LINHA E COLUNA

Mensagem por Felipe Dasi »

Pequeno Tutorial sobre Marcador de Linhas e Colunas, muito bom para não se perder na digitação:

'MARCADOR DE LINHA COM COLUNA
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Dim LinhaInicio As Range
Dim ColunaAtual As Range
Dim MinhaLinha As Range
Dim Linha As Long
Dim Coluna As Long

'ESTABELECE QUE AS CELULAS SERÃO COLORIDAS.
Cells.Interior.ColorIndex = xlNone

Linha = Target.Row
Coluna = Target.Column
'CELULA ONDE SE INICIA A LINHA COLORIDA SEMPRE NA COLUNA A
Set LinhaInicio = Range("A" & Linha, Target)
'PEGA A COLUNA ONDE ESTÁ (INTERSECÇÃO ENTRE LINHA E COLUNA)
Set ColunaAtual = Range(Cells(1, Coluna), Target)
'FOCA A INTERSECÇÃO.
Set MinhaLinha = Union(LinhaInicio, ColunaAtual)

'COR QUE QUER USAR, NO CASO A 3 É VERMELHA
MinhaLinha.Interior.ColorIndex = 3

End Sub


Disable adblock

This site is supported by ads and donations.
If you see this text you are blocking our ads.
Please consider a Donation to support the site.


Avatar do usuário
Mauro Coutinho
Jedi
Jedi
Mensagens: 1561
Registrado em: Sáb Mar 13, 2010 8:10 pm
Localização: São José dos Pinhais - Pr

Re: MARCADOR DE LINHA E COLUNA

Mensagem por Mauro Coutinho »

Felipe, muito boa esta dica, grato por compartilhar.

abraços


Avatar do usuário
webmaster
Administrador
Mensagens: 3114
Registrado em: Sex Jul 24, 2009 2:44 pm
Contato:

Re: MARCADOR DE LINHA E COLUNA

Mensagem por webmaster »

"Show de la pelota"!

Gostei bastante. Posso colocar no blog?


Felipe Dasi
Colaborador
Colaborador
Mensagens: 54
Registrado em: Seg Jul 05, 2010 6:56 am

Re: MARCADOR DE LINHA E COLUNA

Mensagem por Felipe Dasi »

webmaster escreveu:"Show de la pelota"!

Gostei bastante. Posso colocar no blog?
Si..(rs), tenha um otimo fim de semana.


Disable adblock

This site is supported by ads and donations.
If you see this text you are blocking our ads.
Please consider a Donation to support the site.


Avatar do usuário
webmaster
Administrador
Mensagens: 3114
Registrado em: Sex Jul 24, 2009 2:44 pm
Contato:

Re: MARCADOR DE LINHA E COLUNA

Mensagem por webmaster »

Felipe,

Está lá:

http://www.tomasvasquez.com.br/blog/mic ... a-no-excel

Abraços e obrigado mais uma vez


ivanna
Acabou de chegar
Acabou de chegar
Mensagens: 1
Registrado em: Qua Mai 21, 2014 9:12 am

Re: MARCADOR DE LINHA E COLUNA

Mensagem por ivanna »

Bom dia, gostava de perguntar se é possível marcar em vez de linha e coluna todas seguidas apenas uma célula e respectiva coluna,ou seja,


quando clico num determinado range exemplo( S16:S24) quero que a( A16:A24) toma cor de amarelo e celula (S4) também, S visto que o range é na coluna S e 4 é fixo, tal como A é fixo e 16 até 24 é a posição das células seleccionadas.


Desde já agradeço a vossa resposta,
Ivanna


Disable adblock

This site is supported by ads and donations.
If you see this text you are blocking our ads.
Please consider a Donation to support the site.


Responder