Featured Replies
Archived
This topic is now archived and is closed to further replies.
A better way to browse. Learn more.
A full-screen app on your home screen with push notifications, badges and more.
This topic is now archived and is closed to further replies.
Buena Tarde
Tengo una macro en la que tengo algunas variables, una de ellas string pero es para recorrer las celdas, la inicializo con E, la siguiente debe ser F, G, H, I asi consecutivo para que realice una suma
al avanzar en la macro de cada una de las celdas, corriendo el filtro, pero esta variable no he podido, hacer que pueda decirle next y sea la siguiente letra del alafabeto, como podria hacer esto ?
Gracias
Esta es la macro
Dim n&, cCriterio$, H&, LE As String
j = 5
LE = "E"
For H = 5 To 10
For n = j To 19
If n = j Then cCriterio = "<>0" Else cCriterio = "0"
ActiveSheet.Range("$A$11:$AH$" & fila).AutoFilter Field:=n, Criteria1:=cCriterio
Next n
'suma
Range(LE & 10).Select
Range(Selection, Selection.End(xlDown)).Select
Range(LE & 11).Select
Selection.End(xlDown).Select
Range(LE & fila).Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=SUBTOTAL(9,R[-482]C:R[-2]C)"
Range(LE & fila).Select
Selection.Copy
Selection.End(xlUp).Select
Range(LE & 9).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Rows("11:11").Select
ActiveSheet.ShowAllData
Range("A10").Select
LE = "F"
j = j + 1
n = j
Next H
Gracias