Quantcast
Channel: Visual Basic Tips and Tricks
Viewing all articles
Browse latest Browse all 2212

ciclo if VBA

$
0
0

ciao ragazzi scusate ma non sono molto pratico di VB , sto modificando una macro fatta da un altra persona e mi sono limitato a modificare una formula presente con un ciclo if ma non funziona , riuscite ad aiutarmi?

questo il codice:

If (WorksheetFunction.Sum(OnGoingONTIMESUMNOW) + WorksheetFunction.Sum(OnGoingONTIMESUMPREVIOUS)) > ((WorksheetFunction.Sum(OnGoingNOTONTIMESUMNOW) + WorksheetFunction.Sum(OnGoingNOTONTIMESUMPREVIOUS))Then
Sheets("STATISTICS by Week").Cells(FoundCella, 6).Value = ((WorksheetFunction.Sum(OnGoingONTIMESUMNOW) - WorksheetFunction.Sum(OnGoingONTIMESUMPREVIOUS))-((WorksheetFunction.Sum(OnGoingNOTONTIMESUMNOW)-WorksheetFunction.Sum(OnGoingNOTONTIMESUMPREVIOUS))
Else: Sheets("STATISTICS by Week").Cells(FoundCella, 6).Value = WorksheetFunction.Sum(OnGoingONTIMESUMNOW) - (WorksheetFunction.Sum(OnGoingNOTONTIMESUMNOW)
End If

mi da errore :

Errore di compilazione: Previsto: )

Cosa devo fare??

Grazie


Viewing all articles
Browse latest Browse all 2212