Este fórum está sendo desativado

Depois de 9 anos, este fórum será desativado. Mas calma.... estamos migrando para uma comunidade no DISCORD. Junte-se a nós.

ENTRAR PARA DISCORD

Dúvidas sobre cálculos, funções simples e aninhadas, fórmulas matriciais, etc.
  • Avatar do usuário
  • Avatar do usuário
#6202
Boa tarde!!

Eu não entendi....


Imagine que vc tem célua A1 e B1, dentro de A1 coloque =B1, terá o valor de de B1 em A1, se não for isso detalhe melhor sua dúvida.

Att
#6226
Você irá precisar de usar VBA. Cole o código abaixo na classe da planilha em que você altera o valor de A1:
Código: Selecionar todos
Private Sub Worksheet_Change(ByVal Target As Range)
    Dim CellAddress As String
    Dim CellValue As Double
    Dim InputValue As Variant
    
    If Intersect(Range("A1"), Target) = "" Then Exit Sub
    
    Application.EnableEvents = False
    
    On Error GoTo ErrorHandler
    
    InputValue = Split(Range("A1"), "=")
    CellAddress = InputValue(0)
    CellValue = InputValue(1)
    
    Range(CellAddress).Value2 = CellValue
Quit:
    Application.EnableEvents = True
    Exit Sub
ErrorHandler:
    MsgBox "Entrada de dados incorreta. Digite, por exemplo, B1=150 na célula A1.", vbCritical
    Resume Quit
End Sub
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]

Estamos migrando para uma comunidade no Discord