Salve,
la domanda può sembrare stupida ma mi sto avvicinando ora ad una fase di exel più avanzata.
Ho trovato questo codice che dovrebbe risolvere il mio problema ma come faccio ad associarlo alla cella dove voglio che compaia il risultato all'interno del foglio?
E sopratutto dove devo inserire i dati e in che forma?
Function my3DSum(CheckCell As String, CompString As String, SumCell As _
String, ParamArray SheetList() As Variant)
Dim mySheets As Sheets, myWs As Worksheet
Dim myRangeC As Range, myRangeS As Range
Dim rTemp As Range
Dim iRow As Integer
Dim lTot As Long
Set mySheets = Sheets(SheetList)
Set myRangeC = Range(CheckCell)
Set myRangeS = Range(SumCell)
For Each myWs In mySheets
Set myRangeC = myWs.Range(CheckCell)
Set myRangeS = myWs.Range(SumCell)
For Each rTemp In myRangeC
If rTemp.Value = CompString Then
iRow = rTemp.Row
lTot = lTot + myRangeS.Cells(iRow, 1).Value
End If
Next rTemp
Next myWs
my3DSum = lTot
End Function
CHECKCELL : stringa che rappresenta l'intervallo di celle che deve
essere testato
COMPSTRING : valore che deve essere confrontato con le celle presenti
nell'intervallo CHECKCELL
SUMCELL : stringa che rappresenta l'intervallo di celle che deve essere
sommato
SHEETLIST : elenco dei fogli in cui risiede l'intervallo specificato nel
CHECKCELL
Grazie