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.
#12874
Boa tarde, pessoal!

Eu preciso de que, quando a quantidade atual for menor do que 3, por exemplo, em uma outra planilha nomeada como List 2, apareça o nome do produto em falta. Algo assim: se E5 for menor que 3, em uma outra lista aparecerá o A5 (célula com o nome). Mas eu não quero que isso seja global, pois tem itens que a quantidade baixa é 30, por exemplo...
Eu já uso um macro para uma atualização de data de modificação:


Uso esse cod pra poder atualizar a data de modificação de uma célula

Private Sub Worksheet_Change(ByVal Target As Range)
'Update 20140722
Dim WorkRng As Range
Dim Rng As Range
Dim xOffsetColumn As Integer
Dim lngLastRow As Long
lngLastRow = Sheets("Folha3").Range("B" & Rows.Count).End(xlUp).Row

Set WorkRng = Intersect(Application.ActiveSheet.Range("E:E"), Target)
xOffsetColumn = 1
If Not WorkRng Is Nothing Then
Application.EnableEvents = False
For Each Rng In WorkRng
If Not VBA.IsEmpty(Rng.Value) Then
Rng.Offset(0, xOffsetColumn).Value = Now
Rng.Offset(0, xOffsetColumn).NumberFormat = "dd-mm-yyyy, hh:mm:ss"
ActiveCell.Offset(-1, 0).Copy Destination:=Worksheets("Folha3").Cells(Cells.Rows.Count, 1).End(xlUp).Offset(1, 0)
Else
Rng.Offset(0, xOffsetColumn).ClearContents
End If
Next
Application.EnableEvents = True
End If
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