Hi everyone,
I have a small question for you:
Let's say I have a table with headers and I'm trying to calculate an average.
I'm using the following macro to calculate it
Sub Average()
'
' Average Macro
'
'
ActiveCell.FormulaR1C1 = _
"=IFERROR(AVERAGEIF('Report'!C[-2],""Severity 1"",'Report'!C[3]),""-"")"
End Sub
but I would like to change 'Report'!C[-2] with the column header "Severity" and 'Report'!C[3] with the column header "FRT".
How can I do that? Are there some "universal" lines I can use in all macros where I need to get data from a specific column with header?
Thank you again for your help.
Cheers
I have a small question for you:
Let's say I have a table with headers and I'm trying to calculate an average.
I'm using the following macro to calculate it
Sub Average()
'
' Average Macro
'
'
ActiveCell.FormulaR1C1 = _
"=IFERROR(AVERAGEIF('Report'!C[-2],""Severity 1"",'Report'!C[3]),""-"")"
End Sub
but I would like to change 'Report'!C[-2] with the column header "Severity" and 'Report'!C[3] with the column header "FRT".
How can I do that? Are there some "universal" lines I can use in all macros where I need to get data from a specific column with header?
Thank you again for your help.
Cheers