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

Tópicos relacionados a códigos VBA, gravação de macros, etc.
#32835
Boa tarde, amigos, sou iniciante e procurei algo similar para tentar fazer essa macro, mas não encontrei, por isso peço a ajuda dos senhores para fazer esta macro.

Eis o que eu preciso:

Quero que ao colocar o código e a quantidade seja colocada o valor de custo e venda correspondente da primeira compra até acabar o estoque desta primeira compra,
Então, depois puxaria o valor de custo da segunda compra e daí por diante.

Coloque em anexo a planilha que eu tenho.

Obrigado a todos desde já!
Você não está autorizado a ver ou baixar esse anexo.
#33118
Olá pessoal, tentei fazer algo assim , mas não sei o que fazer, sou um prego, kkk, desculpe, me ajudem por favor!

Private Sub ControledeEstoque()

Movimento.Activate
Movimento.Select
Movimento.Range("B3").Select

Do

If ActiveCell.Value <> Movimento.Range("J8") Then
ActiveCell.Offset(1, 0).Select
End If

If ActiveCell.Value = Movimento.Range("J8") Then

ActiveCell.Offset(0, 2).Select
CUSTO = ActiveCell.Value




End If

If ActiveCell.Value = "" Then
MsgBox "Não tem mais em estoque!"
Exit Sub
End If

Loop

Exit Sub
#33119
Fiz com fórmula e usei o recurso tabela. Veja se ajuda.
Você não está autorizado a ver ou baixar esse anexo.
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