I've worksheet "summary" & "ExpLedgers"
ExpLedgers having 8 columns
The 8th no. column i.e. column H having Ledgers GroupCode
I want sum of 6th column (Column F) to store in variable
DataArr(R1, 1) --> Group code store in this array e.g. here it is 16
for this I use following function but it gives an Run-time error '13' Type mismatch
WorksheetFunction.SumIf(Sheets("ExpLedgers").Range("$F:$F"), Sheets("ExpLedgers").Range("$H:$H"), DataArr(R1, 1))
ExpLedgers having 8 columns
The 8th no. column i.e. column H having Ledgers GroupCode
I want sum of 6th column (Column F) to store in variable
DataArr(R1, 1) --> Group code store in this array e.g. here it is 16
for this I use following function but it gives an Run-time error '13' Type mismatch
WorksheetFunction.SumIf(Sheets("ExpLedgers").Range("$F:$F"), Sheets("ExpLedgers").Range("$H:$H"), DataArr(R1, 1))